Package org.xrpl.xrpl4j.model.ledger
Class ImmutableRippleStateObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableRippleStateObject.Builder
- Enclosing class:
ImmutableRippleStateObject
Builds instances of type
ImmutableRippleStateObject.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbalance(IssuedCurrencyAmount balance) Initializes the value for thebalanceattribute.build()Builds a newImmutableRippleStateObject.flags(RippleStateFlags flags) Initializes the value for theflagsattribute.from(RippleStateObject instance) Fill a builder with attribute values from the providedRippleStateObjectinstance.highLimit(IssuedCurrencyAmount highLimit) Initializes the value for thehighLimitattribute.Initializes the optional valuehighNodeto highNode.Initializes the optional valuehighNodeto highNode.highQualityIn(com.google.common.primitives.UnsignedInteger highQualityIn) Initializes the optional valuehighQualityInto highQualityIn.highQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> highQualityIn) Initializes the optional valuehighQualityInto highQualityIn.highQualityOut(com.google.common.primitives.UnsignedInteger highQualityOut) Initializes the optional valuehighQualityOutto highQualityOut.highQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> highQualityOut) Initializes the optional valuehighQualityOutto highQualityOut.Initializes the value for theindexattribute.lowLimit(IssuedCurrencyAmount lowLimit) Initializes the value for thelowLimitattribute.Initializes the optional valuelowNodeto lowNode.Initializes the optional valuelowNodeto lowNode.lowQualityIn(com.google.common.primitives.UnsignedInteger lowQualityIn) Initializes the optional valuelowQualityInto lowQualityIn.lowQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> lowQualityIn) Initializes the optional valuelowQualityInto lowQualityIn.lowQualityOut(com.google.common.primitives.UnsignedInteger lowQualityOut) Initializes the optional valuelowQualityOutto lowQualityOut.lowQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> lowQualityOut) Initializes the optional valuelowQualityOutto lowQualityOut.previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder from(RippleStateObject instance) Fill a builder with attribute values from the providedRippleStateObjectinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
flags
Initializes the value for theflagsattribute.- Parameters:
flags- The value for flags- Returns:
thisbuilder for use in a chained invocation
-
balance
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder balance(IssuedCurrencyAmount balance) Initializes the value for thebalanceattribute.- Parameters:
balance- The value for balance- Returns:
thisbuilder for use in a chained invocation
-
lowLimit
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder lowLimit(IssuedCurrencyAmount lowLimit) Initializes the value for thelowLimitattribute.- Parameters:
lowLimit- The value for lowLimit- Returns:
thisbuilder for use in a chained invocation
-
highLimit
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder highLimit(IssuedCurrencyAmount highLimit) Initializes the value for thehighLimitattribute.- Parameters:
highLimit- The value for highLimit- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionId
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.- Parameters:
previousTransactionId- The value for previousTransactionId- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionLedgerSequence
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.- Parameters:
previousTransactionLedgerSequence- The value for previousTransactionLedgerSequence- Returns:
thisbuilder for use in a chained invocation
-
lowNode
Initializes the optional valuelowNodeto lowNode.- Parameters:
lowNode- The value for lowNode- Returns:
thisbuilder for chained invocation
-
lowNode
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder lowNode(Optional<String> lowNode) Initializes the optional valuelowNodeto lowNode.- Parameters:
lowNode- The value for lowNode- Returns:
thisbuilder for use in a chained invocation
-
highNode
Initializes the optional valuehighNodeto highNode.- Parameters:
highNode- The value for highNode- Returns:
thisbuilder for chained invocation
-
highNode
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder highNode(Optional<String> highNode) Initializes the optional valuehighNodeto highNode.- Parameters:
highNode- The value for highNode- Returns:
thisbuilder for use in a chained invocation
-
lowQualityIn
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder lowQualityIn(com.google.common.primitives.UnsignedInteger lowQualityIn) Initializes the optional valuelowQualityInto lowQualityIn.- Parameters:
lowQualityIn- The value for lowQualityIn- Returns:
thisbuilder for chained invocation
-
lowQualityIn
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder lowQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> lowQualityIn) Initializes the optional valuelowQualityInto lowQualityIn.- Parameters:
lowQualityIn- The value for lowQualityIn- Returns:
thisbuilder for use in a chained invocation
-
lowQualityOut
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder lowQualityOut(com.google.common.primitives.UnsignedInteger lowQualityOut) Initializes the optional valuelowQualityOutto lowQualityOut.- Parameters:
lowQualityOut- The value for lowQualityOut- Returns:
thisbuilder for chained invocation
-
lowQualityOut
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder lowQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> lowQualityOut) Initializes the optional valuelowQualityOutto lowQualityOut.- Parameters:
lowQualityOut- The value for lowQualityOut- Returns:
thisbuilder for use in a chained invocation
-
highQualityIn
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder highQualityIn(com.google.common.primitives.UnsignedInteger highQualityIn) Initializes the optional valuehighQualityInto highQualityIn.- Parameters:
highQualityIn- The value for highQualityIn- Returns:
thisbuilder for chained invocation
-
highQualityIn
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder highQualityIn(Optional<? extends com.google.common.primitives.UnsignedInteger> highQualityIn) Initializes the optional valuehighQualityInto highQualityIn.- Parameters:
highQualityIn- The value for highQualityIn- Returns:
thisbuilder for use in a chained invocation
-
highQualityOut
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder highQualityOut(com.google.common.primitives.UnsignedInteger highQualityOut) Initializes the optional valuehighQualityOutto highQualityOut.- Parameters:
highQualityOut- The value for highQualityOut- Returns:
thisbuilder for chained invocation
-
highQualityOut
@CanIgnoreReturnValue public final ImmutableRippleStateObject.Builder highQualityOut(Optional<? extends com.google.common.primitives.UnsignedInteger> highQualityOut) Initializes the optional valuehighQualityOutto highQualityOut.- Parameters:
highQualityOut- The value for highQualityOut- Returns:
thisbuilder for use in a chained invocation
-
index
Initializes the value for theindexattribute.- Parameters:
index- The value for index- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableRippleStateObject.- Returns:
- An immutable instance of RippleStateObject
- Throws:
IllegalStateException- if any required attributes are missing
-