Package org.stellar.sdk.xdr
Class LiquidityPoolDepositOp
java.lang.Object
org.stellar.sdk.xdr.LiquidityPoolDepositOp
- All Implemented Interfaces:
XdrElement
LiquidityPoolDepositOp's original definition in the XDR file is:
struct LiquidityPoolDepositOp
{
PoolID liquidityPoolID;
int64 maxAmountA; // maximum amount of first asset to deposit
int64 maxAmountB; // maximum amount of second asset to deposit
Price minPrice; // minimum depositA/depositB
Price maxPrice; // maximum depositA/depositB
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LiquidityPoolDepositOpdecode(XdrDataInputStream stream) static LiquidityPoolDepositOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LiquidityPoolDepositOpstatic LiquidityPoolDepositOpfromXdrBase64(String xdr) static LiquidityPoolDepositOpfromXdrByteArray(byte[] xdr) Value of theliquidityPoolIDfield.Value of themaxAmountAfield.Value of themaxAmountBfield.Value of themaxPricefield.Value of theminPricefield.inthashCode()voidsetLiquidityPoolID(PoolID liquidityPoolID) Value of theliquidityPoolIDfield.voidsetMaxAmountA(Int64 maxAmountA) Value of themaxAmountAfield.voidsetMaxAmountB(Int64 maxAmountB) Value of themaxAmountBfield.voidsetMaxPrice(Price maxPrice) Value of themaxPricefield.voidsetMinPrice(Price minPrice) Value of theminPricefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LiquidityPoolDepositOp
public LiquidityPoolDepositOp() -
LiquidityPoolDepositOp
public LiquidityPoolDepositOp(PoolID liquidityPoolID, Int64 maxAmountA, Int64 maxAmountB, Price minPrice, Price maxPrice) Creates a newLiquidityPoolDepositOpinstance.- Parameters:
liquidityPoolID- theliquidityPoolIDfield valuemaxAmountA- themaxAmountAfield valuemaxAmountB- themaxAmountBfield valueminPrice- theminPricefield valuemaxPrice- themaxPricefield 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 LiquidityPoolDepositOp decode(XdrDataInputStream stream, int maxDepth) throws IOException - 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
-
getMaxAmountA
Value of themaxAmountAfield.- Returns:
- the
maxAmountAfield value
-
getMaxAmountB
Value of themaxAmountBfield.- Returns:
- the
maxAmountBfield value
-
getMinPrice
Value of theminPricefield.- Returns:
- the
minPricefield value
-
getMaxPrice
Value of themaxPricefield.- Returns:
- the
maxPricefield value
-
setLiquidityPoolID
Value of theliquidityPoolIDfield.- Parameters:
liquidityPoolID- theliquidityPoolIDfield value
-
setMaxAmountA
Value of themaxAmountAfield.- Parameters:
maxAmountA- themaxAmountAfield value
-
setMaxAmountB
Value of themaxAmountBfield.- Parameters:
maxAmountB- themaxAmountBfield value
-
setMinPrice
Value of theminPricefield.- Parameters:
minPrice- theminPricefield value
-
setMaxPrice
Value of themaxPricefield.- Parameters:
maxPrice- themaxPricefield value
-
equals
-
hashCode
public int hashCode() -
toString
-