Package org.stellar.sdk.xdr
Class ClaimLiquidityAtom
java.lang.Object
org.stellar.sdk.xdr.ClaimLiquidityAtom
- All Implemented Interfaces:
XdrElement
ClaimLiquidityAtom's original definition in the XDR file is:
struct ClaimLiquidityAtom
{
PoolID liquidityPoolID;
// amount and asset taken from the pool
Asset assetSold;
int64 amountSold;
// amount and asset sent to the pool
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 ClaimLiquidityAtomdecode(XdrDataInputStream stream) static ClaimLiquidityAtomdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ClaimLiquidityAtomstatic ClaimLiquidityAtomfromXdrBase64(String xdr) static ClaimLiquidityAtomfromXdrByteArray(byte[] xdr) Value of theamountBoughtfield.Value of theamountSoldfield.Value of theassetBoughtfield.Value of theassetSoldfield.Value of theliquidityPoolIDfield.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.voidsetLiquidityPoolID(PoolID liquidityPoolID) Value of theliquidityPoolIDfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ClaimLiquidityAtom
public ClaimLiquidityAtom() -
ClaimLiquidityAtom
public ClaimLiquidityAtom(PoolID liquidityPoolID, Asset assetSold, Int64 amountSold, Asset assetBought, Int64 amountBought) Creates a newClaimLiquidityAtominstance.- Parameters:
liquidityPoolID- theliquidityPoolIDfield 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
-
getLiquidityPoolID
Value of theliquidityPoolIDfield.- Returns:
- the
liquidityPoolIDfield 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
-
setLiquidityPoolID
Value of theliquidityPoolIDfield.- Parameters:
liquidityPoolID- theliquidityPoolIDfield 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
-