Package org.stellar.sdk.xdr
Class LedgerEntry
java.lang.Object
org.stellar.sdk.xdr.LedgerEntry
- All Implemented Interfaces:
XdrElement
LedgerEntry's original definition in the XDR file is:
struct LedgerEntry
{
uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed
union switch (LedgerEntryType type)
{
case ACCOUNT:
AccountEntry account;
case TRUSTLINE:
TrustLineEntry trustLine;
case OFFER:
OfferEntry offer;
case DATA:
DataEntry data;
case CLAIMABLE_BALANCE:
ClaimableBalanceEntry claimableBalance;
case LIQUIDITY_POOL:
LiquidityPoolEntry liquidityPool;
case CONTRACT_DATA:
ContractDataEntry contractData;
case CONTRACT_CODE:
ContractCodeEntry contractCode;
case CONFIG_SETTING:
ConfigSettingEntry configSetting;
case TTL:
TTLEntry ttl;
}
data;
// reserved for future use
union switch (int v)
{
case 0:
void;
case 1:
LedgerEntryExtensionV1 v1;
}
ext;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classLedgerEntryData's original definition in the XDR file is:static classLedgerEntryExt's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerEntry(Uint32 lastModifiedLedgerSeq, LedgerEntry.LedgerEntryData data, LedgerEntry.LedgerEntryExt ext) Creates a newLedgerEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LedgerEntrydecode(XdrDataInputStream stream) static LedgerEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerEntrystatic LedgerEntryfromXdrBase64(String xdr) static LedgerEntryfromXdrByteArray(byte[] xdr) getData()Value of thedatafield.getExt()Value of theextfield.Value of thelastModifiedLedgerSeqfield.inthashCode()voidValue of thedatafield.voidValue of theextfield.voidsetLastModifiedLedgerSeq(Uint32 lastModifiedLedgerSeq) Value of thelastModifiedLedgerSeqfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerEntry
public LedgerEntry() -
LedgerEntry
public LedgerEntry(Uint32 lastModifiedLedgerSeq, LedgerEntry.LedgerEntryData data, LedgerEntry.LedgerEntryExt ext) Creates a newLedgerEntryinstance.- Parameters:
lastModifiedLedgerSeq- thelastModifiedLedgerSeqfield valuedata- thedatafield valueext- theextfield 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
-
getLastModifiedLedgerSeq
Value of thelastModifiedLedgerSeqfield.- Returns:
- the
lastModifiedLedgerSeqfield value
-
getData
Value of thedatafield.- Returns:
- the
datafield value
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
setLastModifiedLedgerSeq
Value of thelastModifiedLedgerSeqfield.- Parameters:
lastModifiedLedgerSeq- thelastModifiedLedgerSeqfield value
-
setData
Value of thedatafield.- Parameters:
data- thedatafield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
equals
-
hashCode
public int hashCode() -
toString
-