Class ClaimOfferAtomV0

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

public class ClaimOfferAtomV0 extends Object implements XdrElement
ClaimOfferAtomV0's original definition in the XDR file is:
 struct ClaimOfferAtomV0
 {
     // emitted to identify the offer
     uint256 sellerEd25519; // Account that owns the offer
     int64 offerID;

     // amount and asset taken from the owner
     Asset assetSold;
     int64 amountSold;

     // amount and asset sent to the owner
     Asset assetBought;
     int64 amountBought;
 };
 
  • Constructor Details

    • ClaimOfferAtomV0

      public ClaimOfferAtomV0()
    • ClaimOfferAtomV0

      public ClaimOfferAtomV0(Uint256 sellerEd25519, Int64 offerID, Asset assetSold, Int64 amountSold, Asset assetBought, Int64 amountBought)
      Creates a new ClaimOfferAtomV0 instance.
      Parameters:
      sellerEd25519 - the sellerEd25519 field value
      offerID - the offerID field value
      assetSold - the assetSold field value
      amountSold - the amountSold field value
      assetBought - the assetBought field value
      amountBought - the amountBought 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 ClaimOfferAtomV0 decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

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

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

      public static ClaimOfferAtomV0 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 ClaimOfferAtomV0 fromJson(String json)
    • builder

    • toBuilder

    • getSellerEd25519

      public Uint256 getSellerEd25519()
      Value of the sellerEd25519 field.
      Returns:
      the sellerEd25519 field value
    • getOfferID

      public Int64 getOfferID()
      Value of the offerID field.
      Returns:
      the offerID field value
    • getAssetSold

      public Asset getAssetSold()
      Value of the assetSold field.
      Returns:
      the assetSold field value
    • getAmountSold

      public Int64 getAmountSold()
      Value of the amountSold field.
      Returns:
      the amountSold field value
    • getAssetBought

      public Asset getAssetBought()
      Value of the assetBought field.
      Returns:
      the assetBought field value
    • getAmountBought

      public Int64 getAmountBought()
      Value of the amountBought field.
      Returns:
      the amountBought field value
    • setSellerEd25519

      public void setSellerEd25519(Uint256 sellerEd25519)
      Value of the sellerEd25519 field.
      Parameters:
      sellerEd25519 - the sellerEd25519 field value
    • setOfferID

      public void setOfferID(Int64 offerID)
      Value of the offerID field.
      Parameters:
      offerID - the offerID field value
    • setAssetSold

      public void setAssetSold(Asset assetSold)
      Value of the assetSold field.
      Parameters:
      assetSold - the assetSold field value
    • setAmountSold

      public void setAmountSold(Int64 amountSold)
      Value of the amountSold field.
      Parameters:
      amountSold - the amountSold field value
    • setAssetBought

      public void setAssetBought(Asset assetBought)
      Value of the assetBought field.
      Parameters:
      assetBought - the assetBought field value
    • setAmountBought

      public void setAmountBought(Int64 amountBought)
      Value of the amountBought field.
      Parameters:
      amountBought - the amountBought 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