Package org.stellar.sdk.xdr
Class LedgerEntry.LedgerEntryData
java.lang.Object
org.stellar.sdk.xdr.LedgerEntry.LedgerEntryData
- All Implemented Interfaces:
XdrElement
- Enclosing class:
LedgerEntry
LedgerEntryData's original definition in the XDR file is:
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;
}
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerEntryData(LedgerEntryType discriminant, AccountEntry account, TrustLineEntry trustLine, OfferEntry offer, DataEntry data, ClaimableBalanceEntry claimableBalance, LiquidityPoolEntry liquidityPool, ContractDataEntry contractData, ContractCodeEntry contractCode, ConfigSettingEntry configSetting, TTLEntry ttl) Creates a newLedgerEntryDatainstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LedgerEntry.LedgerEntryDatadecode(XdrDataInputStream stream) static LedgerEntry.LedgerEntryDatadecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerEntry.LedgerEntryDatastatic LedgerEntry.LedgerEntryDatafromXdrBase64(String xdr) static LedgerEntry.LedgerEntryDatafromXdrByteArray(byte[] xdr) Value of theaccountfield.Value of theclaimableBalancefield.Value of theconfigSettingfield.Value of thecontractCodefield.Value of thecontractDatafield.getData()Value of thedatafield.Value of thediscriminantfield.Value of theliquidityPoolfield.getOffer()Value of theofferfield.Value of thetrustLinefield.getTtl()Value of thettlfield.inthashCode()voidsetAccount(AccountEntry account) Value of theaccountfield.voidsetClaimableBalance(ClaimableBalanceEntry claimableBalance) Value of theclaimableBalancefield.voidsetConfigSetting(ConfigSettingEntry configSetting) Value of theconfigSettingfield.voidsetContractCode(ContractCodeEntry contractCode) Value of thecontractCodefield.voidsetContractData(ContractDataEntry contractData) Value of thecontractDatafield.voidValue of thedatafield.voidsetDiscriminant(LedgerEntryType discriminant) Value of thediscriminantfield.voidsetLiquidityPool(LiquidityPoolEntry liquidityPool) Value of theliquidityPoolfield.voidsetOffer(OfferEntry offer) Value of theofferfield.voidsetTrustLine(TrustLineEntry trustLine) Value of thetrustLinefield.voidValue of thettlfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerEntryData
public LedgerEntryData() -
LedgerEntryData
public LedgerEntryData(LedgerEntryType discriminant, AccountEntry account, TrustLineEntry trustLine, OfferEntry offer, DataEntry data, ClaimableBalanceEntry claimableBalance, LiquidityPoolEntry liquidityPool, ContractDataEntry contractData, ContractCodeEntry contractCode, ConfigSettingEntry configSetting, TTLEntry ttl) Creates a newLedgerEntryDatainstance.- Parameters:
discriminant- thediscriminantfield valueaccount- theaccountfield valuetrustLine- thetrustLinefield valueoffer- theofferfield valuedata- thedatafield valueclaimableBalance- theclaimableBalancefield valueliquidityPool- theliquidityPoolfield valuecontractData- thecontractDatafield valuecontractCode- thecontractCodefield valueconfigSetting- theconfigSettingfield valuettl- thettlfield 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
public static LedgerEntry.LedgerEntryData decode(XdrDataInputStream stream, int maxDepth) throws IOException - 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
-
getAccount
Value of theaccountfield.- Returns:
- the
accountfield value
-
getTrustLine
Value of thetrustLinefield.- Returns:
- the
trustLinefield value
-
getOffer
Value of theofferfield.- Returns:
- the
offerfield value
-
getData
Value of thedatafield.- Returns:
- the
datafield value
-
getClaimableBalance
Value of theclaimableBalancefield.- Returns:
- the
claimableBalancefield value
-
getLiquidityPool
Value of theliquidityPoolfield.- Returns:
- the
liquidityPoolfield value
-
getContractData
Value of thecontractDatafield.- Returns:
- the
contractDatafield value
-
getContractCode
Value of thecontractCodefield.- Returns:
- the
contractCodefield value
-
getConfigSetting
Value of theconfigSettingfield.- Returns:
- the
configSettingfield value
-
getTtl
Value of thettlfield.- Returns:
- the
ttlfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setAccount
Value of theaccountfield.- Parameters:
account- theaccountfield value
-
setTrustLine
Value of thetrustLinefield.- Parameters:
trustLine- thetrustLinefield value
-
setOffer
Value of theofferfield.- Parameters:
offer- theofferfield value
-
setData
Value of thedatafield.- Parameters:
data- thedatafield value
-
setClaimableBalance
Value of theclaimableBalancefield.- Parameters:
claimableBalance- theclaimableBalancefield value
-
setLiquidityPool
Value of theliquidityPoolfield.- Parameters:
liquidityPool- theliquidityPoolfield value
-
setContractData
Value of thecontractDatafield.- Parameters:
contractData- thecontractDatafield value
-
setContractCode
Value of thecontractCodefield.- Parameters:
contractCode- thecontractCodefield value
-
setConfigSetting
Value of theconfigSettingfield.- Parameters:
configSetting- theconfigSettingfield value
-
setTtl
Value of thettlfield.- Parameters:
ttl- thettlfield value
-
equals
-
hashCode
public int hashCode() -
toString
-