Class PathPaymentStrictSendOp

java.lang.Object
org.stellar.sdk.xdr.PathPaymentStrictSendOp
All Implemented Interfaces:
XdrElement

public class PathPaymentStrictSendOp extends Object implements XdrElement
PathPaymentStrictSendOp's original definition in the XDR file is:
 struct PathPaymentStrictSendOp
 {
     Asset sendAsset;  // asset we pay with
     int64 sendAmount; // amount of sendAsset to send (excluding fees)

     MuxedAccount destination; // recipient of the payment
     Asset destAsset;          // what they end up with
     int64 destMin;            // the minimum amount of dest asset to
                               // be received
                               // The operation will fail if it can't be met

     Asset path<5>; // additional hops it must go through to get there
 };
 
  • Constructor Details

    • PathPaymentStrictSendOp

      public PathPaymentStrictSendOp()
    • PathPaymentStrictSendOp

      public PathPaymentStrictSendOp(Asset sendAsset, Int64 sendAmount, MuxedAccount destination, Asset destAsset, Int64 destMin, Asset[] path)
      Creates a new PathPaymentStrictSendOp instance.
      Parameters:
      sendAsset - the sendAsset field value
      sendAmount - the sendAmount field value
      destination - the destination field value
      destAsset - the destAsset field value
      destMin - the destMin field value
      path - the path field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • decode

      public static PathPaymentStrictSendOp decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static PathPaymentStrictSendOp decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static PathPaymentStrictSendOp fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static PathPaymentStrictSendOp fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static PathPaymentStrictSendOp fromJson(String json)
    • builder

    • toBuilder

    • getSendAsset

      public Asset getSendAsset()
      Value of the sendAsset field.
      Returns:
      the sendAsset field value
    • getSendAmount

      public Int64 getSendAmount()
      Value of the sendAmount field.
      Returns:
      the sendAmount field value
    • getDestination

      public MuxedAccount getDestination()
      Value of the destination field.
      Returns:
      the destination field value
    • getDestAsset

      public Asset getDestAsset()
      Value of the destAsset field.
      Returns:
      the destAsset field value
    • getDestMin

      public Int64 getDestMin()
      Value of the destMin field.
      Returns:
      the destMin field value
    • getPath

      public Asset[] getPath()
      Value of the path field.
      Returns:
      the path field value
    • setSendAsset

      public void setSendAsset(Asset sendAsset)
      Value of the sendAsset field.
      Parameters:
      sendAsset - the sendAsset field value
    • setSendAmount

      public void setSendAmount(Int64 sendAmount)
      Value of the sendAmount field.
      Parameters:
      sendAmount - the sendAmount field value
    • setDestination

      public void setDestination(MuxedAccount destination)
      Value of the destination field.
      Parameters:
      destination - the destination field value
    • setDestAsset

      public void setDestAsset(Asset destAsset)
      Value of the destAsset field.
      Parameters:
      destAsset - the destAsset field value
    • setDestMin

      public void setDestMin(Int64 destMin)
      Value of the destMin field.
      Parameters:
      destMin - the destMin field value
    • setPath

      public void setPath(Asset[] path)
      Value of the path field.
      Parameters:
      path - the path field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object