Package org.stellar.sdk.xdr
Class ClaimAtom
java.lang.Object
org.stellar.sdk.xdr.ClaimAtom
- All Implemented Interfaces:
XdrElement
ClaimAtom's original definition in the XDR file is:
union ClaimAtom switch (ClaimAtomType type)
{
case CLAIM_ATOM_TYPE_V0:
ClaimOfferAtomV0 v0;
case CLAIM_ATOM_TYPE_ORDER_BOOK:
ClaimOfferAtom orderBook;
case CLAIM_ATOM_TYPE_LIQUIDITY_POOL:
ClaimLiquidityAtom liquidityPool;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionClaimAtom(ClaimAtomType discriminant, ClaimOfferAtomV0 v0, ClaimOfferAtom orderBook, ClaimLiquidityAtom liquidityPool) Creates a newClaimAtominstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClaimAtom.ClaimAtomBuilderbuilder()static ClaimAtomdecode(XdrDataInputStream stream) static ClaimAtomdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ClaimAtomstatic ClaimAtomfromXdrBase64(String xdr) static ClaimAtomfromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of theliquidityPoolfield.Value of theorderBookfield.getV0()Value of thev0field.inthashCode()voidsetDiscriminant(ClaimAtomType discriminant) Value of thediscriminantfield.voidsetLiquidityPool(ClaimLiquidityAtom liquidityPool) Value of theliquidityPoolfield.voidsetOrderBook(ClaimOfferAtom orderBook) Value of theorderBookfield.voidValue of thev0field.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ClaimAtom
public ClaimAtom() -
ClaimAtom
public ClaimAtom(ClaimAtomType discriminant, ClaimOfferAtomV0 v0, ClaimOfferAtom orderBook, ClaimLiquidityAtom liquidityPool) Creates a newClaimAtominstance.- Parameters:
discriminant- thediscriminantfield valuev0- thev0field valueorderBook- theorderBookfield valueliquidityPool- theliquidityPoolfield 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
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getV0
Value of thev0field.- Returns:
- the
v0field value
-
getOrderBook
Value of theorderBookfield.- Returns:
- the
orderBookfield value
-
getLiquidityPool
Value of theliquidityPoolfield.- Returns:
- the
liquidityPoolfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setV0
Value of thev0field.- Parameters:
v0- thev0field value
-
setOrderBook
Value of theorderBookfield.- Parameters:
orderBook- theorderBookfield value
-
setLiquidityPool
Value of theliquidityPoolfield.- Parameters:
liquidityPool- theliquidityPoolfield value
-
equals
-
hashCode
public int hashCode() -
toString
-