Package org.stellar.sdk.xdr
Class LedgerBounds
java.lang.Object
org.stellar.sdk.xdr.LedgerBounds
- All Implemented Interfaces:
XdrElement
LedgerBounds's original definition in the XDR file is:
struct LedgerBounds
{
uint32 minLedger;
uint32 maxLedger; // 0 here means no maxLedger
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerBounds(Uint32 minLedger, Uint32 maxLedger) Creates a newLedgerBoundsinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LedgerBoundsdecode(XdrDataInputStream stream) static LedgerBoundsdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerBoundsstatic LedgerBoundsfromXdrBase64(String xdr) static LedgerBoundsfromXdrByteArray(byte[] xdr) Value of themaxLedgerfield.Value of theminLedgerfield.inthashCode()voidsetMaxLedger(Uint32 maxLedger) Value of themaxLedgerfield.voidsetMinLedger(Uint32 minLedger) Value of theminLedgerfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerBounds
public LedgerBounds() -
LedgerBounds
Creates a newLedgerBoundsinstance.- Parameters:
minLedger- theminLedgerfield valuemaxLedger- themaxLedgerfield 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
-
getMinLedger
Value of theminLedgerfield.- Returns:
- the
minLedgerfield value
-
getMaxLedger
Value of themaxLedgerfield.- Returns:
- the
maxLedgerfield value
-
setMinLedger
Value of theminLedgerfield.- Parameters:
minLedger- theminLedgerfield value
-
setMaxLedger
Value of themaxLedgerfield.- Parameters:
maxLedger- themaxLedgerfield value
-
equals
-
hashCode
public int hashCode() -
toString
-