Package org.xrpl.xrpl4j.model.ledger
Class ImmutableNfTokenOfferObject.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableNfTokenOfferObject.Builder
- Enclosing class:
ImmutableNfTokenOfferObject
Builds instances of type
ImmutableNfTokenOfferObject.
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 TypeMethodDescriptionamount(CurrencyAmount amount) Initializes the value for theamountattribute.build()Builds a newImmutableNfTokenOfferObject.destination(Optional<? extends Address> destination) Initializes the optional valuedestinationto destination.destination(Address destination) Initializes the optional valuedestinationto destination.expiration(com.google.common.primitives.UnsignedInteger expiration) Initializes the optional valueexpirationto expiration.expiration(Optional<? extends com.google.common.primitives.UnsignedInteger> expiration) Initializes the optional valueexpirationto expiration.flags(NfTokenOfferFlags flags) Initializes the value for theflagsattribute.from(NfTokenOfferObject instance) Fill a builder with attribute values from the providedNfTokenOfferObjectinstance.Initializes the value for theindexattribute.Initializes the value for thenfTokenIdattribute.Initializes the optional valueofferNodeto offerNode.Initializes the optional valueofferNodeto offerNode.Initializes the value for theownerattribute.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
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder from(NfTokenOfferObject instance) Fill a builder with attribute values from the providedNfTokenOfferObjectinstance. 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
-
amount
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder amount(CurrencyAmount amount) Initializes the value for theamountattribute.- Parameters:
amount- The value for amount- Returns:
thisbuilder for use in a chained invocation
-
owner
Initializes the value for theownerattribute.- Parameters:
owner- The value for owner- Returns:
thisbuilder for use in a chained invocation
-
previousTransactionId
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.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 ImmutableNfTokenOfferObject.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
-
nfTokenId
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder nfTokenId(NfTokenId nfTokenId) Initializes the value for thenfTokenIdattribute.- Parameters:
nfTokenId- The value for nfTokenId- Returns:
thisbuilder for use in a chained invocation
-
expiration
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder expiration(com.google.common.primitives.UnsignedInteger expiration) Initializes the optional valueexpirationto expiration.- Parameters:
expiration- The value for expiration- Returns:
thisbuilder for chained invocation
-
expiration
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder expiration(Optional<? extends com.google.common.primitives.UnsignedInteger> expiration) Initializes the optional valueexpirationto expiration.- Parameters:
expiration- The value for expiration- Returns:
thisbuilder for use in a chained invocation
-
destination
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder destination(Address destination) Initializes the optional valuedestinationto destination.- Parameters:
destination- The value for destination- Returns:
thisbuilder for chained invocation
-
destination
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder destination(Optional<? extends Address> destination) Initializes the optional valuedestinationto destination.- Parameters:
destination- The value for destination- 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 ImmutableNfTokenOfferObject.Builder ownerNode(Optional<String> ownerNode) Initializes the optional valueownerNodeto ownerNode.- Parameters:
ownerNode- The value for ownerNode- Returns:
thisbuilder for use in a chained invocation
-
offerNode
Initializes the optional valueofferNodeto offerNode.- Parameters:
offerNode- The value for offerNode- Returns:
thisbuilder for chained invocation
-
offerNode
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder offerNode(Optional<String> offerNode) Initializes the optional valueofferNodeto offerNode.- Parameters:
offerNode- The value for offerNode- Returns:
thisbuilder for use in a chained invocation
-
flags
@CanIgnoreReturnValue public final ImmutableNfTokenOfferObject.Builder flags(NfTokenOfferFlags flags) Initializes the value for theflagsattribute.- Parameters:
flags- The value for flags- 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 newImmutableNfTokenOfferObject.- Returns:
- An immutable instance of NfTokenOfferObject
- Throws:
IllegalStateException- if any required attributes are missing
-