Package org.stellar.sdk.xdr
Class LedgerEntryChange
java.lang.Object
org.stellar.sdk.xdr.LedgerEntryChange
- All Implemented Interfaces:
XdrElement
LedgerEntryChange's original definition in the XDR file is:
union LedgerEntryChange switch (LedgerEntryChangeType type)
{
case LEDGER_ENTRY_CREATED:
LedgerEntry created;
case LEDGER_ENTRY_UPDATED:
LedgerEntry updated;
case LEDGER_ENTRY_REMOVED:
LedgerKey removed;
case LEDGER_ENTRY_STATE:
LedgerEntry state;
case LEDGER_ENTRY_RESTORED:
LedgerEntry restored;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerEntryChange(LedgerEntryChangeType discriminant, LedgerEntry created, LedgerEntry updated, LedgerKey removed, LedgerEntry state, LedgerEntry restored) Creates a newLedgerEntryChangeinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LedgerEntryChangedecode(XdrDataInputStream stream) static LedgerEntryChangedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerEntryChangestatic LedgerEntryChangefromXdrBase64(String xdr) static LedgerEntryChangefromXdrByteArray(byte[] xdr) Value of thecreatedfield.Value of thediscriminantfield.Value of theremovedfield.Value of therestoredfield.getState()Value of thestatefield.Value of theupdatedfield.inthashCode()voidsetCreated(LedgerEntry created) Value of thecreatedfield.voidsetDiscriminant(LedgerEntryChangeType discriminant) Value of thediscriminantfield.voidsetRemoved(LedgerKey removed) Value of theremovedfield.voidsetRestored(LedgerEntry restored) Value of therestoredfield.voidsetState(LedgerEntry state) Value of thestatefield.voidsetUpdated(LedgerEntry updated) Value of theupdatedfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerEntryChange
public LedgerEntryChange() -
LedgerEntryChange
public LedgerEntryChange(LedgerEntryChangeType discriminant, LedgerEntry created, LedgerEntry updated, LedgerKey removed, LedgerEntry state, LedgerEntry restored) Creates a newLedgerEntryChangeinstance.- Parameters:
discriminant- thediscriminantfield valuecreated- thecreatedfield valueupdated- theupdatedfield valueremoved- theremovedfield valuestate- thestatefield valuerestored- therestoredfield 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
-
getCreated
Value of thecreatedfield.- Returns:
- the
createdfield value
-
getUpdated
Value of theupdatedfield.- Returns:
- the
updatedfield value
-
getRemoved
Value of theremovedfield.- Returns:
- the
removedfield value
-
getState
Value of thestatefield.- Returns:
- the
statefield value
-
getRestored
Value of therestoredfield.- Returns:
- the
restoredfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setCreated
Value of thecreatedfield.- Parameters:
created- thecreatedfield value
-
setUpdated
Value of theupdatedfield.- Parameters:
updated- theupdatedfield value
-
setRemoved
Value of theremovedfield.- Parameters:
removed- theremovedfield value
-
setState
Value of thestatefield.- Parameters:
state- thestatefield value
-
setRestored
Value of therestoredfield.- Parameters:
restored- therestoredfield value
-
equals
-
hashCode
public int hashCode() -
toString
-