Package org.stellar.sdk.xdr
Class AccountMergeResult
java.lang.Object
org.stellar.sdk.xdr.AccountMergeResult
- All Implemented Interfaces:
XdrElement
AccountMergeResult's original definition in the XDR file is:
union AccountMergeResult switch (AccountMergeResultCode code)
{
case ACCOUNT_MERGE_SUCCESS:
int64 sourceAccountBalance; // how much got transferred from source account
case ACCOUNT_MERGE_MALFORMED:
case ACCOUNT_MERGE_NO_ACCOUNT:
case ACCOUNT_MERGE_IMMUTABLE_SET:
case ACCOUNT_MERGE_HAS_SUB_ENTRIES:
case ACCOUNT_MERGE_SEQNUM_TOO_FAR:
case ACCOUNT_MERGE_DEST_FULL:
case ACCOUNT_MERGE_IS_SPONSOR:
void;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionAccountMergeResult(AccountMergeResultCode discriminant, Int64 sourceAccountBalance) Creates a newAccountMergeResultinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static AccountMergeResultdecode(XdrDataInputStream stream) static AccountMergeResultdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic AccountMergeResultstatic AccountMergeResultfromXdrBase64(String xdr) static AccountMergeResultfromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of thesourceAccountBalancefield.inthashCode()voidsetDiscriminant(AccountMergeResultCode discriminant) Value of thediscriminantfield.voidsetSourceAccountBalance(Int64 sourceAccountBalance) Value of thesourceAccountBalancefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
AccountMergeResult
public AccountMergeResult() -
AccountMergeResult
Creates a newAccountMergeResultinstance.- Parameters:
discriminant- thediscriminantfield valuesourceAccountBalance- thesourceAccountBalancefield 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
-
getSourceAccountBalance
Value of thesourceAccountBalancefield.- Returns:
- the
sourceAccountBalancefield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setSourceAccountBalance
Value of thesourceAccountBalancefield.- Parameters:
sourceAccountBalance- thesourceAccountBalancefield value
-
equals
-
hashCode
public int hashCode() -
toString
-