Package org.stellar.sdk.xdr
Class ClaimOfferAtom
java.lang.Object
org.stellar.sdk.xdr.ClaimOfferAtom
- All Implemented Interfaces:
XdrElement
ClaimOfferAtom's original definition in the XDR file is:
struct ClaimOfferAtom
{
// emitted to identify the offer
AccountID sellerID; // 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;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ClaimOfferAtomdecode(XdrDataInputStream stream) static ClaimOfferAtomdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ClaimOfferAtomstatic ClaimOfferAtomfromXdrBase64(String xdr) static ClaimOfferAtomfromXdrByteArray(byte[] xdr) Value of theamountBoughtfield.Value of theamountSoldfield.Value of theassetBoughtfield.Value of theassetSoldfield.Value of theofferIDfield.Value of thesellerIDfield.inthashCode()voidsetAmountBought(Int64 amountBought) Value of theamountBoughtfield.voidsetAmountSold(Int64 amountSold) Value of theamountSoldfield.voidsetAssetBought(Asset assetBought) Value of theassetBoughtfield.voidsetAssetSold(Asset assetSold) Value of theassetSoldfield.voidsetOfferID(Int64 offerID) Value of theofferIDfield.voidsetSellerID(AccountID sellerID) Value of thesellerIDfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ClaimOfferAtom
public ClaimOfferAtom() -
ClaimOfferAtom
public ClaimOfferAtom(AccountID sellerID, Int64 offerID, Asset assetSold, Int64 amountSold, Asset assetBought, Int64 amountBought) Creates a newClaimOfferAtominstance.- Parameters:
sellerID- thesellerIDfield valueofferID- theofferIDfield valueassetSold- theassetSoldfield valueamountSold- theamountSoldfield valueassetBought- theassetBoughtfield valueamountBought- theamountBoughtfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getSellerID
Value of thesellerIDfield.- Returns:
- the
sellerIDfield value
-
getOfferID
Value of theofferIDfield.- Returns:
- the
offerIDfield value
-
getAssetSold
Value of theassetSoldfield.- Returns:
- the
assetSoldfield value
-
getAmountSold
Value of theamountSoldfield.- Returns:
- the
amountSoldfield value
-
getAssetBought
Value of theassetBoughtfield.- Returns:
- the
assetBoughtfield value
-
getAmountBought
Value of theamountBoughtfield.- Returns:
- the
amountBoughtfield value
-
setSellerID
Value of thesellerIDfield.- Parameters:
sellerID- thesellerIDfield value
-
setOfferID
Value of theofferIDfield.- Parameters:
offerID- theofferIDfield value
-
setAssetSold
Value of theassetSoldfield.- Parameters:
assetSold- theassetSoldfield value
-
setAmountSold
Value of theamountSoldfield.- Parameters:
amountSold- theamountSoldfield value
-
setAssetBought
Value of theassetBoughtfield.- Parameters:
assetBought- theassetBoughtfield value
-
setAmountBought
Value of theamountBoughtfield.- Parameters:
amountBought- theamountBoughtfield value
-
equals
-
hashCode
public int hashCode() -
toString
-