Class LedgerEntry.LedgerEntryData

java.lang.Object
org.stellar.sdk.xdr.LedgerEntry.LedgerEntryData
All Implemented Interfaces:
XdrElement
Enclosing class:
LedgerEntry

public static class LedgerEntry.LedgerEntryData extends Object implements XdrElement
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;
     }
 
  • 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 new LedgerEntryData instance.
      Parameters:
      discriminant - the discriminant field value
      account - the account field value
      trustLine - the trustLine field value
      offer - the offer field value
      data - the data field value
      claimableBalance - the claimableBalance field value
      liquidityPool - the liquidityPool field value
      contractData - the contractData field value
      contractCode - the contractCode field value
      configSetting - the configSetting field value
      ttl - the ttl field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      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

      public static LedgerEntry.LedgerEntryData decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static LedgerEntry.LedgerEntryData fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static LedgerEntry.LedgerEntryData fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static LedgerEntry.LedgerEntryData fromJson(String json)
    • builder

    • toBuilder

    • getDiscriminant

      public LedgerEntryType getDiscriminant()
      Value of the discriminant field.
      Returns:
      the discriminant field value
    • getAccount

      public AccountEntry getAccount()
      Value of the account field.
      Returns:
      the account field value
    • getTrustLine

      public TrustLineEntry getTrustLine()
      Value of the trustLine field.
      Returns:
      the trustLine field value
    • getOffer

      public OfferEntry getOffer()
      Value of the offer field.
      Returns:
      the offer field value
    • getData

      public DataEntry getData()
      Value of the data field.
      Returns:
      the data field value
    • getClaimableBalance

      public ClaimableBalanceEntry getClaimableBalance()
      Value of the claimableBalance field.
      Returns:
      the claimableBalance field value
    • getLiquidityPool

      public LiquidityPoolEntry getLiquidityPool()
      Value of the liquidityPool field.
      Returns:
      the liquidityPool field value
    • getContractData

      public ContractDataEntry getContractData()
      Value of the contractData field.
      Returns:
      the contractData field value
    • getContractCode

      public ContractCodeEntry getContractCode()
      Value of the contractCode field.
      Returns:
      the contractCode field value
    • getConfigSetting

      public ConfigSettingEntry getConfigSetting()
      Value of the configSetting field.
      Returns:
      the configSetting field value
    • getTtl

      public TTLEntry getTtl()
      Value of the ttl field.
      Returns:
      the ttl field value
    • setDiscriminant

      public void setDiscriminant(LedgerEntryType discriminant)
      Value of the discriminant field.
      Parameters:
      discriminant - the discriminant field value
    • setAccount

      public void setAccount(AccountEntry account)
      Value of the account field.
      Parameters:
      account - the account field value
    • setTrustLine

      public void setTrustLine(TrustLineEntry trustLine)
      Value of the trustLine field.
      Parameters:
      trustLine - the trustLine field value
    • setOffer

      public void setOffer(OfferEntry offer)
      Value of the offer field.
      Parameters:
      offer - the offer field value
    • setData

      public void setData(DataEntry data)
      Value of the data field.
      Parameters:
      data - the data field value
    • setClaimableBalance

      public void setClaimableBalance(ClaimableBalanceEntry claimableBalance)
      Value of the claimableBalance field.
      Parameters:
      claimableBalance - the claimableBalance field value
    • setLiquidityPool

      public void setLiquidityPool(LiquidityPoolEntry liquidityPool)
      Value of the liquidityPool field.
      Parameters:
      liquidityPool - the liquidityPool field value
    • setContractData

      public void setContractData(ContractDataEntry contractData)
      Value of the contractData field.
      Parameters:
      contractData - the contractData field value
    • setContractCode

      public void setContractCode(ContractCodeEntry contractCode)
      Value of the contractCode field.
      Parameters:
      contractCode - the contractCode field value
    • setConfigSetting

      public void setConfigSetting(ConfigSettingEntry configSetting)
      Value of the configSetting field.
      Parameters:
      configSetting - the configSetting field value
    • setTtl

      public void setTtl(TTLEntry ttl)
      Value of the ttl field.
      Parameters:
      ttl - the ttl field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object