Class LiquidityPoolDepositOp

java.lang.Object
org.stellar.sdk.xdr.LiquidityPoolDepositOp
All Implemented Interfaces:
XdrElement

public class LiquidityPoolDepositOp extends Object implements 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
 };
 
  • Constructor Details

    • LiquidityPoolDepositOp

      public LiquidityPoolDepositOp()
    • LiquidityPoolDepositOp

      public LiquidityPoolDepositOp(PoolID liquidityPoolID, Int64 maxAmountA, Int64 maxAmountB, Price minPrice, Price maxPrice)
      Creates a new LiquidityPoolDepositOp instance.
      Parameters:
      liquidityPoolID - the liquidityPoolID field value
      maxAmountA - the maxAmountA field value
      maxAmountB - the maxAmountB field value
      minPrice - the minPrice field value
      maxPrice - the maxPrice field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      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

      public static LiquidityPoolDepositOp decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static LiquidityPoolDepositOp fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static LiquidityPoolDepositOp fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static LiquidityPoolDepositOp fromJson(String json)
    • builder

    • toBuilder

    • getLiquidityPoolID

      public PoolID getLiquidityPoolID()
      Value of the liquidityPoolID field.
      Returns:
      the liquidityPoolID field value
    • getMaxAmountA

      public Int64 getMaxAmountA()
      Value of the maxAmountA field.
      Returns:
      the maxAmountA field value
    • getMaxAmountB

      public Int64 getMaxAmountB()
      Value of the maxAmountB field.
      Returns:
      the maxAmountB field value
    • getMinPrice

      public Price getMinPrice()
      Value of the minPrice field.
      Returns:
      the minPrice field value
    • getMaxPrice

      public Price getMaxPrice()
      Value of the maxPrice field.
      Returns:
      the maxPrice field value
    • setLiquidityPoolID

      public void setLiquidityPoolID(PoolID liquidityPoolID)
      Value of the liquidityPoolID field.
      Parameters:
      liquidityPoolID - the liquidityPoolID field value
    • setMaxAmountA

      public void setMaxAmountA(Int64 maxAmountA)
      Value of the maxAmountA field.
      Parameters:
      maxAmountA - the maxAmountA field value
    • setMaxAmountB

      public void setMaxAmountB(Int64 maxAmountB)
      Value of the maxAmountB field.
      Parameters:
      maxAmountB - the maxAmountB field value
    • setMinPrice

      public void setMinPrice(Price minPrice)
      Value of the minPrice field.
      Parameters:
      minPrice - the minPrice field value
    • setMaxPrice

      public void setMaxPrice(Price maxPrice)
      Value of the maxPrice field.
      Parameters:
      maxPrice - the maxPrice field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object