Package org.stellar.sdk.xdr
Class LiquidityPoolEntry
java.lang.Object
org.stellar.sdk.xdr.LiquidityPoolEntry
- All Implemented Interfaces:
XdrElement
LiquidityPoolEntry's original definition in the XDR file is:
struct LiquidityPoolEntry
{
PoolID liquidityPoolID;
union switch (LiquidityPoolType type)
{
case LIQUIDITY_POOL_CONSTANT_PRODUCT:
struct
{
LiquidityPoolConstantProductParameters params;
int64 reserveA; // amount of A in the pool
int64 reserveB; // amount of B in the pool
int64 totalPoolShares; // total number of pool shares issued
int64 poolSharesTrustLineCount; // number of trust lines for the
// associated pool shares
} constantProduct;
}
body;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLiquidityPoolEntryBody's original definition in the XDR file is:static class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLiquidityPoolEntry(PoolID liquidityPoolID, LiquidityPoolEntry.LiquidityPoolEntryBody body) Creates a newLiquidityPoolEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LiquidityPoolEntrydecode(XdrDataInputStream stream) static LiquidityPoolEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LiquidityPoolEntrystatic LiquidityPoolEntryfromXdrBase64(String xdr) static LiquidityPoolEntryfromXdrByteArray(byte[] xdr) getBody()Value of thebodyfield.Value of theliquidityPoolIDfield.inthashCode()voidValue of thebodyfield.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
-
LiquidityPoolEntry
public LiquidityPoolEntry() -
LiquidityPoolEntry
Creates a newLiquidityPoolEntryinstance.- Parameters:
liquidityPoolID- theliquidityPoolIDfield valuebody- thebodyfield 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
-
getBody
Value of thebodyfield.- Returns:
- the
bodyfield value
-
setLiquidityPoolID
Value of theliquidityPoolIDfield.- Parameters:
liquidityPoolID- theliquidityPoolIDfield value
-
setBody
Value of thebodyfield.- Parameters:
body- thebodyfield value
-
equals
-
hashCode
public int hashCode() -
toString
-