Package org.stellar.sdk.xdr
Class LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct
java.lang.Object
org.stellar.sdk.xdr.LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct
- All Implemented Interfaces:
XdrElement
- Enclosing class:
LiquidityPoolEntry.LiquidityPoolEntryBody
public static class LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct
extends Object
implements XdrElement
LiquidityPoolEntryConstantProduct's original definition in the XDR file is:
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
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLiquidityPoolEntryConstantProduct(LiquidityPoolConstantProductParameters params, Int64 reserveA, Int64 reserveB, Int64 totalPoolShares, Int64 poolSharesTrustLineCount) Creates a newLiquidityPoolEntryConstantProductinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()decode(XdrDataInputStream stream) decode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanfromXdrBase64(String xdr) fromXdrByteArray(byte[] xdr) Value of theparamsfield.Value of thepoolSharesTrustLineCountfield.Value of thereserveAfield.Value of thereserveBfield.Value of thetotalPoolSharesfield.inthashCode()voidValue of theparamsfield.voidsetPoolSharesTrustLineCount(Int64 poolSharesTrustLineCount) Value of thepoolSharesTrustLineCountfield.voidsetReserveA(Int64 reserveA) Value of thereserveAfield.voidsetReserveB(Int64 reserveB) Value of thereserveBfield.voidsetTotalPoolShares(Int64 totalPoolShares) Value of thetotalPoolSharesfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LiquidityPoolEntryConstantProduct
public LiquidityPoolEntryConstantProduct() -
LiquidityPoolEntryConstantProduct
public LiquidityPoolEntryConstantProduct(LiquidityPoolConstantProductParameters params, Int64 reserveA, Int64 reserveB, Int64 totalPoolShares, Int64 poolSharesTrustLineCount) Creates a newLiquidityPoolEntryConstantProductinstance.- Parameters:
params- theparamsfield valuereserveA- thereserveAfield valuereserveB- thereserveBfield valuetotalPoolShares- thetotalPoolSharesfield valuepoolSharesTrustLineCount- thepoolSharesTrustLineCountfield 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
public static LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
public static LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct decode(XdrDataInputStream stream) throws IOException - Throws:
IOException
-
fromXdrBase64
public static LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct fromXdrBase64(String xdr) throws IOException - Throws:
IOException
-
fromXdrByteArray
public static LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct fromXdrByteArray(byte[] xdr) throws IOException - Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
public static LiquidityPoolEntry.LiquidityPoolEntryBody.LiquidityPoolEntryConstantProduct fromJson(String json) -
builder
-
toBuilder
-
getParams
Value of theparamsfield.- Returns:
- the
paramsfield value
-
getReserveA
Value of thereserveAfield.- Returns:
- the
reserveAfield value
-
getReserveB
Value of thereserveBfield.- Returns:
- the
reserveBfield value
-
setParams
Value of theparamsfield.- Parameters:
params- theparamsfield value
-
setReserveA
Value of thereserveAfield.- Parameters:
reserveA- thereserveAfield value
-
setReserveB
Value of thereserveBfield.- Parameters:
reserveB- thereserveBfield value
-
equals
-
hashCode
public int hashCode() -
toString
-