Package org.xrpl.xrpl4j.model.ledger
Class ImmutableMpTokenObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableMpTokenObject.Builder
- Enclosing class:
ImmutableMpTokenObject
Builds instances of type
ImmutableMpTokenObject.
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 TypeMethodDescriptionInitializes the value for theaccountattribute.build()Builds a newImmutableMpTokenObject.flags(MpTokenFlags flags) Initializes the value for theflagsattribute.from(MpTokenObject instance) Fill a builder with attribute values from the providedMpTokenObjectinstance.Initializes the value for theindexattribute.lockedAmount(Optional<? extends MpTokenNumericAmount> lockedAmount) Initializes the optional valuelockedAmountto lockedAmount.lockedAmount(MpTokenNumericAmount lockedAmount) Initializes the optional valuelockedAmountto lockedAmount.mptAmount(MpTokenNumericAmount mptAmount) Initializes the value for themptAmountattribute.mpTokenIssuanceId(MpTokenIssuanceId mpTokenIssuanceId) Initializes the value for thempTokenIssuanceIdattribute.Initializes the optional valueownerNodeto ownerNode.Initializes the optional valueownerNodeto ownerNode.previousTransactionId(Hash256 previousTransactionId) Initializes the value for thepreviousTransactionIdattribute.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence) Initializes the value for thepreviousTransactionLedgerSequenceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMpTokenObjectinstance. 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
-
account
Initializes the value for theaccountattribute.- Parameters:
account- The value for account- Returns:
thisbuilder for use in a chained invocation
-
mpTokenIssuanceId
@CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder mpTokenIssuanceId(MpTokenIssuanceId mpTokenIssuanceId) Initializes the value for thempTokenIssuanceIdattribute.- Parameters:
mpTokenIssuanceId- The value for mpTokenIssuanceId- Returns:
thisbuilder for use in a chained invocation
-
mptAmount
@CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder mptAmount(MpTokenNumericAmount mptAmount) Initializes the value for themptAmountattribute.If not set, this attribute will have a default value as returned by the initializer of
mptAmount.- Parameters:
mptAmount- The value for mptAmount- Returns:
thisbuilder for use in a chained invocation
-
lockedAmount
@CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder lockedAmount(MpTokenNumericAmount lockedAmount) Initializes the optional valuelockedAmountto lockedAmount.- Parameters:
lockedAmount- The value for lockedAmount- Returns:
thisbuilder for chained invocation
-
lockedAmount
@CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder lockedAmount(Optional<? extends MpTokenNumericAmount> lockedAmount) Initializes the optional valuelockedAmountto lockedAmount.- Parameters:
lockedAmount- The value for lockedAmount- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionId
@CanIgnoreReturnValue public final ImmutableMpTokenObject.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 ImmutableMpTokenObject.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
-
ownerNode
Initializes the optional valueownerNodeto ownerNode.- Parameters:
ownerNode- The value for ownerNode- Returns:
thisbuilder for chained invocation
-
ownerNode
@CanIgnoreReturnValue public final ImmutableMpTokenObject.Builder ownerNode(Optional<String> ownerNode) Initializes the optional valueownerNodeto ownerNode.- Parameters:
ownerNode- The value for ownerNode- 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 newImmutableMpTokenObject.- Returns:
- An immutable instance of MpTokenObject
- Throws:
IllegalStateException- if any required attributes are missing
-