Package org.stellar.sdk.xdr
Class ClaimOfferAtomV0
java.lang.Object
org.stellar.sdk.xdr.ClaimOfferAtomV0
- All Implemented Interfaces:
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;
};
-
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 ClaimOfferAtomV0decode(XdrDataInputStream stream) static ClaimOfferAtomV0decode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ClaimOfferAtomV0static ClaimOfferAtomV0fromXdrBase64(String xdr) static ClaimOfferAtomV0fromXdrByteArray(byte[] xdr) Value of theamountBoughtfield.Value of theamountSoldfield.Value of theassetBoughtfield.Value of theassetSoldfield.Value of theofferIDfield.Value of thesellerEd25519field.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.voidsetSellerEd25519(Uint256 sellerEd25519) Value of thesellerEd25519field.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ClaimOfferAtomV0
public ClaimOfferAtomV0() -
ClaimOfferAtomV0
public ClaimOfferAtomV0(Uint256 sellerEd25519, Int64 offerID, Asset assetSold, Int64 amountSold, Asset assetBought, Int64 amountBought) Creates a newClaimOfferAtomV0instance.- Parameters:
sellerEd25519- thesellerEd25519field 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
-
getSellerEd25519
Value of thesellerEd25519field.- Returns:
- the
sellerEd25519field 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
-
setSellerEd25519
Value of thesellerEd25519field.- Parameters:
sellerEd25519- thesellerEd25519field 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
-