Package org.stellar.sdk.xdr
Class BucketEntry
java.lang.Object
org.stellar.sdk.xdr.BucketEntry
- All Implemented Interfaces:
XdrElement
BucketEntry's original definition in the XDR file is:
union BucketEntry switch (BucketEntryType type)
{
case LIVEENTRY:
case INITENTRY:
LedgerEntry liveEntry;
case DEADENTRY:
LedgerKey deadEntry;
case METAENTRY:
BucketMetadata metaEntry;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionBucketEntry(BucketEntryType discriminant, LedgerEntry liveEntry, LedgerKey deadEntry, BucketMetadata metaEntry) Creates a newBucketEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static BucketEntrydecode(XdrDataInputStream stream) static BucketEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic BucketEntrystatic BucketEntryfromXdrBase64(String xdr) static BucketEntryfromXdrByteArray(byte[] xdr) Value of thedeadEntryfield.Value of thediscriminantfield.Value of theliveEntryfield.Value of themetaEntryfield.inthashCode()voidsetDeadEntry(LedgerKey deadEntry) Value of thedeadEntryfield.voidsetDiscriminant(BucketEntryType discriminant) Value of thediscriminantfield.voidsetLiveEntry(LedgerEntry liveEntry) Value of theliveEntryfield.voidsetMetaEntry(BucketMetadata metaEntry) Value of themetaEntryfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
BucketEntry
public BucketEntry() -
BucketEntry
public BucketEntry(BucketEntryType discriminant, LedgerEntry liveEntry, LedgerKey deadEntry, BucketMetadata metaEntry) Creates a newBucketEntryinstance.- Parameters:
discriminant- thediscriminantfield valueliveEntry- theliveEntryfield valuedeadEntry- thedeadEntryfield valuemetaEntry- themetaEntryfield 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
-
getLiveEntry
Value of theliveEntryfield.- Returns:
- the
liveEntryfield value
-
getDeadEntry
Value of thedeadEntryfield.- Returns:
- the
deadEntryfield value
-
getMetaEntry
Value of themetaEntryfield.- Returns:
- the
metaEntryfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setLiveEntry
Value of theliveEntryfield.- Parameters:
liveEntry- theliveEntryfield value
-
setDeadEntry
Value of thedeadEntryfield.- Parameters:
deadEntry- thedeadEntryfield value
-
setMetaEntry
Value of themetaEntryfield.- Parameters:
metaEntry- themetaEntryfield value
-
equals
-
hashCode
public int hashCode() -
toString
-