Package org.stellar.sdk.xdr
Class Claimant
java.lang.Object
org.stellar.sdk.xdr.Claimant
- All Implemented Interfaces:
XdrElement
Claimant's original definition in the XDR file is:
union Claimant switch (ClaimantType type)
{
case CLAIMANT_TYPE_V0:
struct
{
AccountID destination; // The account that can use this condition
ClaimPredicate predicate; // Claimable if predicate is true
} v0;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classClaimantV0's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionClaimant()Claimant(ClaimantType discriminant, Claimant.ClaimantV0 v0) Creates a newClaimantinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic Claimant.ClaimantBuilderbuilder()static Claimantdecode(XdrDataInputStream stream) static Claimantdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic Claimantstatic ClaimantfromXdrBase64(String xdr) static ClaimantfromXdrByteArray(byte[] xdr) Value of thediscriminantfield.getV0()Value of thev0field.inthashCode()voidsetDiscriminant(ClaimantType discriminant) Value of thediscriminantfield.voidValue of thev0field.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
Claimant
public Claimant() -
Claimant
Creates a newClaimantinstance.- Parameters:
discriminant- thediscriminantfield valuev0- thev0field 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
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setV0
Value of thev0field.- Parameters:
v0- thev0field value
-
equals
-
hashCode
public int hashCode() -
toString
-