Class LedgerIndexBound
- All Implemented Interfaces:
Serializable,Comparable<Wrapper<Long>>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class LedgerIndexBound
extends Wrapper<Long>
This class is similar to
LedgerIndex in that it represents a numerical ledger version on the XRP Ledger.
However, LedgerIndexBound can be used to specify ranges of ledgers in some rippled API request objects,
such as AccountTransactionsRequestParams. Unlike LedgerIndex
which wraps an unsigned long value, this class supports -1 and does not allow 0.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidSubtract anIntegerfrom thisLedgerIndexBound.Subtract aLongfrom thisLedgerIndexBound.minus(LedgerIndex ledgerIndex) Subtract aLedgerIndexfrom thisLedgerIndexBound.minus(LedgerIndexBound other) Subtract aLedgerIndexBoundfrom thisLedgerIndexBound.static LedgerIndexBoundof(int ledgerIndexBound) Static constructor.static LedgerIndexBoundConstruct a new immutableLedgerIndexBoundinstance.Add anIntegerto thisLedgerIndexBound.Add aLongto thisLedgerIndexBound.plus(LedgerIndex ledgerIndex) Add aLedgerIndexto thisLedgerIndexBound.plus(LedgerIndexBound other) Add aLedgerIndexBoundto thisLedgerIndexBound.toString()static LedgerIndexBoundvalue()The wrapped value.
-
Method Details
-
value
The wrapped value. -
of
Construct a new immutableLedgerIndexBoundinstance.- Parameters:
value- The value for thevalueattribute- Returns:
- An immutable LedgerIndexBound instance
-
of
Static constructor.- Parameters:
ledgerIndexBound- An integer representing the ledger-index bound.- Returns:
- A
LedgerIndexBound.
-
unbounded
-
toString
-
plus
Add aLedgerIndexBoundto thisLedgerIndexBound.- Parameters:
other- AnotherLedgerIndexBoundto add.- Returns:
- A
LedgerIndexBoundwrapping the sum of the two wrappedLongvalues of thisLedgerIndexBoundandother.
-
plus
Add aLedgerIndexto thisLedgerIndexBound.- Parameters:
ledgerIndex- ALedgerIndexto add to thisLedgerIndexBound.- Returns:
- A
LedgerIndexBoundwrapping the sum of the two values of thisLedgerIndexBoundandledgerIndex.
-
plus
Add aLongto thisLedgerIndexBound.- Parameters:
value- ALongto add.- Returns:
- A
LedgerIndexBoundwrapping the sum of thisLedgerIndexBound's value andvalue.
-
plus
Add anIntegerto thisLedgerIndexBound.- Parameters:
value- AnIntegerto add.- Returns:
- A
LedgerIndexBoundwrapping the sum of thisLedgerIndexBound's value andvalue.
-
minus
Subtract aLedgerIndexBoundfrom thisLedgerIndexBound.- Parameters:
other- AnotherLedgerIndexBoundto subtract.- Returns:
- A
LedgerIndexBoundwrapping the difference of the two wrappedLongvalues of thisLedgerIndexBoundandother.
-
minus
Subtract aLedgerIndexfrom thisLedgerIndexBound.- Parameters:
ledgerIndex- ALedgerIndexto subtract.- Returns:
- A
LedgerIndexBoundwrapping the difference of the two values of thisLedgerIndexBoundandledgerIndex.
-
minus
Subtract aLongfrom thisLedgerIndexBound.- Parameters:
value- ALongto subtract.- Returns:
- A
LedgerIndexBoundwrapping the difference of thisLedgerIndexBound's value andvalue.
-
minus
Subtract anIntegerfrom thisLedgerIndexBound.- Parameters:
value- AnIntegerto subtract.- Returns:
- A
LedgerIndexBoundwrapping the difference of thisLedgerIndexBound's value andvalue.
-
checkBounds
@Check public void checkBounds()
-