Package org.xrpl.xrpl4j.model.ledger
Class ImmutableRippleStateObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableRippleStateObject
- All Implemented Interfaces:
LedgerObject,RippleStateObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableRippleStateObject
extends Object
implements RippleStateObject
Immutable implementation of
RippleStateObject.
Use the builder to create immutable instances:
ImmutableRippleStateObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRippleStateObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionbalance()The balance of the trust line, from the perspective of the low account.builder()Creates a builder forImmutableRippleStateObject.static ImmutableRippleStateObjectcopyOf(RippleStateObject instance) Creates an immutable copy of aRippleStateObjectvalue.booleanThis instance is equal to all instances ofImmutableRippleStateObjectthat have equal attribute values.flags()A set of booleanRippleStateFlagscontaining options enabled for this object.inthashCode()Computes a hash code from attributes:ledgerEntryType,flags,balance,lowLimit,highLimit,previousTransactionId,previousTransactionLedgerSequence,lowNode,highNode,lowQualityIn,lowQualityOut,highQualityIn,highQualityOut,index.The limit that the high account has set on the trust line.highNode()(Omitted in some historical ledgers) A hint indicating which page of the high account's owner directory links to this object, in case the directory consists of multiple pages.Optional<com.google.common.primitives.UnsignedInteger> The inbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000.Optional<com.google.common.primitives.UnsignedInteger> The outbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000.index()Unique identifier for thisRippleStateObject.The type of ledger object.lowLimit()The limit that the low account has set on the trust line.lowNode()(Omitted in some historical ledgers) A hint indicating which page of the low account's owner directory links to this object, in case the directory consists of multiple pages.Optional<com.google.common.primitives.UnsignedInteger> The inbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000.Optional<com.google.common.primitives.UnsignedInteger> The outbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000.The identifying hash of the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.toString()Prints the immutable valueRippleStateObjectwith attribute values.withBalance(IssuedCurrencyAmount value) Copy the current immutable object by setting a value for thebalanceattribute.withFlags(RippleStateFlags value) Copy the current immutable object by setting a value for theflagsattribute.Copy the current immutable object by setting a value for thehighLimitattribute.withHighNode(String value) Copy the current immutable object by setting a present value for the optionalhighNodeattribute.withHighNode(Optional<String> optional) Copy the current immutable object by setting an optional value for thehighNodeattribute.withHighQualityIn(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalhighQualityInattribute.withHighQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thehighQualityInattribute.withHighQualityOut(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalhighQualityOutattribute.withHighQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thehighQualityOutattribute.Copy the current immutable object by setting a value for theindexattribute.withLowLimit(IssuedCurrencyAmount value) Copy the current immutable object by setting a value for thelowLimitattribute.withLowNode(String value) Copy the current immutable object by setting a present value for the optionallowNodeattribute.withLowNode(Optional<String> optional) Copy the current immutable object by setting an optional value for thelowNodeattribute.withLowQualityIn(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionallowQualityInattribute.withLowQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thelowQualityInattribute.withLowQualityOut(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionallowQualityOutattribute.withLowQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thelowQualityOutattribute.withPreviousTransactionId(Hash256 value) Copy the current immutable object by setting a value for thepreviousTransactionIdattribute.withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute.
-
Method Details
-
ledgerEntryType
The type of ledger object. In this case, this is always "RippleState".- Specified by:
ledgerEntryTypein interfaceRippleStateObject- Returns:
- Always
LedgerObject.LedgerEntryType.RIPPLE_STATE.
-
flags
A set of booleanRippleStateFlagscontaining options enabled for this object.- Specified by:
flagsin interfaceRippleStateObject- Returns:
- The
RippleStateFlagsfor this object.
-
balance
The balance of the trust line, from the perspective of the low account. A negative balance indicates that the low account has issued currency to the high account. The issuer in this is always set to the neutral value ACCOUNT_ONE.- Specified by:
balancein interfaceRippleStateObject- Returns:
- An
IssuedCurrencyAmountcontaining the balance of this trust line.
-
lowLimit
The limit that the low account has set on the trust line. The issuer is the address of the low account that set this limit.- Specified by:
lowLimitin interfaceRippleStateObject- Returns:
- An
IssuedCurrencyAmountcontaining the low account's limit on this trust line.
-
highLimit
The limit that the high account has set on the trust line. The issuer is the address of the high account that set this limit.- Specified by:
highLimitin interfaceRippleStateObject- Returns:
- An
IssuedCurrencyAmountcontaining the high account's limit on this trust line.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceRippleStateObject- Returns:
- A
Hash256containing the previous transaction hash.
-
previousTransactionLedgerSequence
public com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence()The index of the ledger that contains the transaction that most recently modified this object.- Specified by:
previousTransactionLedgerSequencein interfaceRippleStateObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
lowNode
(Omitted in some historical ledgers) A hint indicating which page of the low account's owner directory links to this object, in case the directory consists of multiple pages.- Specified by:
lowNodein interfaceRippleStateObject- Returns:
- An
Optionalof typeStringcontaining the hint.
-
highNode
(Omitted in some historical ledgers) A hint indicating which page of the high account's owner directory links to this object, in case the directory consists of multiple pages.- Specified by:
highNodein interfaceRippleStateObject- Returns:
- An
Optionalof typeStringcontaining the hint.
-
lowQualityIn
The inbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Specified by:
lowQualityInin interfaceRippleStateObject- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the low account's inbound quality.
-
lowQualityOut
The outbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Specified by:
lowQualityOutin interfaceRippleStateObject- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the low account's outbound quality.
-
highQualityIn
The inbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Specified by:
highQualityInin interfaceRippleStateObject- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the high account's inbound quality.
-
highQualityOut
The outbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Specified by:
highQualityOutin interfaceRippleStateObject- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the high account's outbound quality.
-
index
Unique identifier for thisRippleStateObject.- Specified by:
indexin interfaceRippleStateObject- Returns:
- A
Hash256containing the ID.
-
withFlags
Copy the current immutable object by setting a value for theflagsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for flags- Returns:
- A modified copy of the
thisobject
-
withBalance
Copy the current immutable object by setting a value for thebalanceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for balance- Returns:
- A modified copy of the
thisobject
-
withLowLimit
Copy the current immutable object by setting a value for thelowLimitattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lowLimit- Returns:
- A modified copy of the
thisobject
-
withHighLimit
Copy the current immutable object by setting a value for thehighLimitattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for highLimit- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionId
Copy the current immutable object by setting a value for thepreviousTransactionIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionId- Returns:
- A modified copy of the
thisobject
-
withPreviousTransactionLedgerSequence
public final ImmutableRippleStateObject withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thepreviousTransactionLedgerSequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for previousTransactionLedgerSequence- Returns:
- A modified copy of the
thisobject
-
withLowNode
Copy the current immutable object by setting a present value for the optionallowNodeattribute.- Parameters:
value- The value for lowNode- Returns:
- A modified copy of
thisobject
-
withLowNode
Copy the current immutable object by setting an optional value for thelowNodeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for lowNode- Returns:
- A modified copy of
thisobject
-
withHighNode
Copy the current immutable object by setting a present value for the optionalhighNodeattribute.- Parameters:
value- The value for highNode- Returns:
- A modified copy of
thisobject
-
withHighNode
Copy the current immutable object by setting an optional value for thehighNodeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for highNode- Returns:
- A modified copy of
thisobject
-
withLowQualityIn
public final ImmutableRippleStateObject withLowQualityIn(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionallowQualityInattribute.- Parameters:
value- The value for lowQualityIn- Returns:
- A modified copy of
thisobject
-
withLowQualityIn
public final ImmutableRippleStateObject withLowQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thelowQualityInattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for lowQualityIn- Returns:
- A modified copy of
thisobject
-
withLowQualityOut
public final ImmutableRippleStateObject withLowQualityOut(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionallowQualityOutattribute.- Parameters:
value- The value for lowQualityOut- Returns:
- A modified copy of
thisobject
-
withLowQualityOut
public final ImmutableRippleStateObject withLowQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thelowQualityOutattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for lowQualityOut- Returns:
- A modified copy of
thisobject
-
withHighQualityIn
public final ImmutableRippleStateObject withHighQualityIn(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalhighQualityInattribute.- Parameters:
value- The value for highQualityIn- Returns:
- A modified copy of
thisobject
-
withHighQualityIn
public final ImmutableRippleStateObject withHighQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thehighQualityInattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for highQualityIn- Returns:
- A modified copy of
thisobject
-
withHighQualityOut
public final ImmutableRippleStateObject withHighQualityOut(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalhighQualityOutattribute.- Parameters:
value- The value for highQualityOut- Returns:
- A modified copy of
thisobject
-
withHighQualityOut
public final ImmutableRippleStateObject withHighQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thehighQualityOutattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for highQualityOut- Returns:
- A modified copy of
thisobject
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableRippleStateObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,flags,balance,lowLimit,highLimit,previousTransactionId,previousTransactionLedgerSequence,lowNode,highNode,lowQualityIn,lowQualityOut,highQualityIn,highQualityOut,index. -
toString
Prints the immutable valueRippleStateObjectwith attribute values. -
copyOf
Creates an immutable copy of aRippleStateObjectvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable RippleStateObject instance
-
builder
Creates a builder forImmutableRippleStateObject.ImmutableRippleStateObject.builder() .flags(org.xrpl.xrpl4j.model.flags.RippleStateFlags) // requiredflags.balance(org.xrpl.xrpl4j.model.transactions.IssuedCurrencyAmount) // requiredbalance.lowLimit(org.xrpl.xrpl4j.model.transactions.IssuedCurrencyAmount) // requiredlowLimit.highLimit(org.xrpl.xrpl4j.model.transactions.IssuedCurrencyAmount) // requiredhighLimit.previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTransactionId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.lowNode(String) // optionallowNode.highNode(String) // optionalhighNode.lowQualityIn(com.google.common.primitives.UnsignedInteger) // optionallowQualityIn.lowQualityOut(com.google.common.primitives.UnsignedInteger) // optionallowQualityOut.highQualityIn(com.google.common.primitives.UnsignedInteger) // optionalhighQualityIn.highQualityOut(com.google.common.primitives.UnsignedInteger) // optionalhighQualityOut.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutableRippleStateObject builder
-