Package org.stellar.sdk.xdr
Class StellarValue
java.lang.Object
org.stellar.sdk.xdr.StellarValue
- All Implemented Interfaces:
XdrElement
StellarValue's original definition in the XDR file is:
struct StellarValue
{
Hash txSetHash; // transaction set to apply to previous ledger
TimePoint closeTime; // network close time
// upgrades to apply to the previous ledger (usually empty)
// this is a vector of encoded 'LedgerUpgrade' so that nodes can drop
// unknown steps during consensus if needed.
// see notes below on 'LedgerUpgrade' for more detail
// max size is dictated by number of upgrade types (+ room for future)
UpgradeType upgrades<6>;
// reserved for future use
union switch (StellarValueType v)
{
case STELLAR_VALUE_BASIC:
void;
case STELLAR_VALUE_SIGNED:
LedgerCloseValueSignature lcValueSignature;
}
ext;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classStellarValueExt's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionStellarValue(Hash txSetHash, TimePoint closeTime, UpgradeType[] upgrades, StellarValue.StellarValueExt ext) Creates a newStellarValueinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static StellarValuedecode(XdrDataInputStream stream) static StellarValuedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic StellarValuestatic StellarValuefromXdrBase64(String xdr) static StellarValuefromXdrByteArray(byte[] xdr) Value of thecloseTimefield.getExt()Value of theextfield.Value of thetxSetHashfield.Value of theupgradesfield.inthashCode()voidsetCloseTime(TimePoint closeTime) Value of thecloseTimefield.voidValue of theextfield.voidsetTxSetHash(Hash txSetHash) Value of thetxSetHashfield.voidsetUpgrades(UpgradeType[] upgrades) Value of theupgradesfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
StellarValue
public StellarValue() -
StellarValue
public StellarValue(Hash txSetHash, TimePoint closeTime, UpgradeType[] upgrades, StellarValue.StellarValueExt ext) Creates a newStellarValueinstance.- Parameters:
txSetHash- thetxSetHashfield valuecloseTime- thecloseTimefield valueupgrades- theupgradesfield 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
-
getTxSetHash
Value of thetxSetHashfield.- Returns:
- the
txSetHashfield value
-
getCloseTime
Value of thecloseTimefield.- Returns:
- the
closeTimefield value
-
getUpgrades
Value of theupgradesfield.- Returns:
- the
upgradesfield value
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
setTxSetHash
Value of thetxSetHashfield.- Parameters:
txSetHash- thetxSetHashfield value
-
setCloseTime
Value of thecloseTimefield.- Parameters:
closeTime- thecloseTimefield value
-
setUpgrades
Value of theupgradesfield.- Parameters:
upgrades- theupgradesfield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
equals
-
hashCode
public int hashCode() -
toString
-