Package org.stellar.sdk.xdr
Class LiquidityPoolConstantProductParameters
java.lang.Object
org.stellar.sdk.xdr.LiquidityPoolConstantProductParameters
- All Implemented Interfaces:
XdrElement
LiquidityPoolConstantProductParameters's original definition in the XDR file is:
struct LiquidityPoolConstantProductParameters
{
Asset assetA; // assetA < assetB
Asset assetB;
int32 fee; // Fee is in basis points, so the actual rate is (fee/100)%
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLiquidityPoolConstantProductParameters(Asset assetA, Asset assetB, Int32 fee) Creates a newLiquidityPoolConstantProductParametersinstance. -
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 theassetAfield.Value of theassetBfield.getFee()Value of thefeefield.inthashCode()voidValue of theassetAfield.voidValue of theassetBfield.voidValue of thefeefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LiquidityPoolConstantProductParameters
public LiquidityPoolConstantProductParameters() -
LiquidityPoolConstantProductParameters
Creates a newLiquidityPoolConstantProductParametersinstance.- Parameters:
assetA- theassetAfield valueassetB- theassetBfield valuefee- thefeefield 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 LiquidityPoolConstantProductParameters decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
public static LiquidityPoolConstantProductParameters decode(XdrDataInputStream stream) throws IOException - Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
public static LiquidityPoolConstantProductParameters 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
-
builder
public static LiquidityPoolConstantProductParameters.LiquidityPoolConstantProductParametersBuilder builder() -
toBuilder
-
getAssetA
Value of theassetAfield.- Returns:
- the
assetAfield value
-
getAssetB
Value of theassetBfield.- Returns:
- the
assetBfield value
-
getFee
Value of thefeefield.- Returns:
- the
feefield value
-
setAssetA
Value of theassetAfield.- Parameters:
assetA- theassetAfield value
-
setAssetB
Value of theassetBfield.- Parameters:
assetB- theassetBfield value
-
setFee
Value of thefeefield.- Parameters:
fee- thefeefield value
-
equals
-
hashCode
public int hashCode() -
toString
-