Package org.xrpl.xrpl4j.model.ledger
Class ImmutableNfTokenOfferObject
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableNfTokenOfferObject
- All Implemented Interfaces:
LedgerObject,NfTokenOfferObject
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableNfTokenOfferObject
extends Object
implements NfTokenOfferObject
Immutable implementation of
NfTokenOfferObject.
Use the builder to create immutable instances:
ImmutableNfTokenOfferObject.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableNfTokenOfferObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionamount()The amount expected or offered for the token.builder()Creates a builder forImmutableNfTokenOfferObject.static ImmutableNfTokenOfferObjectcopyOf(NfTokenOfferObject instance) Creates an immutable copy of aNfTokenOfferObjectvalue.The intended recipient of theNfTokenObject.booleanThis instance is equal to all instances ofImmutableNfTokenOfferObjectthat have equal attribute values.Optional<com.google.common.primitives.UnsignedInteger> A time after which this offer is considered unfunded, as the number of seconds since the Ripple Epoch.flags()A set of booleanNfTokenOfferFlagscontaining options enabled for this object.inthashCode()Computes a hash code from attributes:ledgerEntryType,amount,owner,previousTransactionId,previousTransactionLedgerSequence,nfTokenId,expiration,destination,ownerNode,offerNode,flags,index.index()The unique ID of thisNfTokenOfferObject.The type of ledger object.The TokenId of the NfToken for which the offer has been created.A hint indicating which page of the token buy or sell offer directory links to this object.owner()Addressof the source account that created and owns the offer.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.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 valueNfTokenOfferObjectwith attribute values.withAmount(CurrencyAmount value) Copy the current immutable object by setting a value for theamountattribute.withDestination(Optional<? extends Address> optional) Copy the current immutable object by setting an optional value for thedestinationattribute.withDestination(Address value) Copy the current immutable object by setting a present value for the optionaldestinationattribute.withExpiration(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalexpirationattribute.withExpiration(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for theexpirationattribute.withFlags(NfTokenOfferFlags value) Copy the current immutable object by setting a value for theflagsattribute.Copy the current immutable object by setting a value for theindexattribute.withNfTokenId(NfTokenId value) Copy the current immutable object by setting a value for thenfTokenIdattribute.withOfferNode(String value) Copy the current immutable object by setting a present value for the optionalofferNodeattribute.withOfferNode(Optional<String> optional) Copy the current immutable object by setting an optional value for theofferNodeattribute.Copy the current immutable object by setting a value for theownerattribute.withOwnerNode(String value) Copy the current immutable object by setting a present value for the optionalownerNodeattribute.withOwnerNode(Optional<String> optional) Copy the current immutable object by setting an optional value for theownerNodeattribute.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 "NfTokenOffer".- Specified by:
ledgerEntryTypein interfaceNfTokenOfferObject- Returns:
- Always
LedgerObject.LedgerEntryType.NFTOKEN_OFFER.
-
amount
The amount expected or offered for the token.- Specified by:
amountin interfaceNfTokenOfferObject- Returns:
- The
CurrencyAmount.
-
owner
Addressof the source account that created and owns the offer.- Specified by:
ownerin interfaceNfTokenOfferObject- Returns:
- The
Addressof the NfTokenOffer owner.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceNfTokenOfferObject- 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 interfaceNfTokenOfferObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
nfTokenId
The TokenId of the NfToken for which the offer has been created.- Specified by:
nfTokenIdin interfaceNfTokenOfferObject- Returns:
NfTokenIdof the NfToken.
-
expiration
A time after which this offer is considered unfunded, as the number of seconds since the Ripple Epoch.- Specified by:
expirationin interfaceNfTokenOfferObject- Returns:
- The offer's expiration.
-
destination
The intended recipient of theNfTokenObject. This address will receive the NFToken when the offer is accepted.- Specified by:
destinationin interfaceNfTokenOfferObject- Returns:
- The
Addressof the destination.
-
ownerNode
A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.- Specified by:
ownerNodein interfaceNfTokenOfferObject- Returns:
- A
Stringcontaining the hint.
-
offerNode
A hint indicating which page of the token buy or sell offer directory links to this object.- Specified by:
offerNodein interfaceNfTokenOfferObject- Returns:
- A
Stringcontaining the hint.
-
flags
A set of booleanNfTokenOfferFlagscontaining options enabled for this object.- Specified by:
flagsin interfaceNfTokenOfferObject- Returns:
- The
NfTokenOfferFlagsfor this object.
-
index
The unique ID of thisNfTokenOfferObject.- Specified by:
indexin interfaceNfTokenOfferObject- Returns:
- A
Hash256containing the ID.
-
withAmount
Copy the current immutable object by setting a value for theamountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for amount- Returns:
- A modified copy of the
thisobject
-
withOwner
Copy the current immutable object by setting a value for theownerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for owner- 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 ImmutableNfTokenOfferObject 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
-
withNfTokenId
Copy the current immutable object by setting a value for thenfTokenIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nfTokenId- Returns:
- A modified copy of the
thisobject
-
withExpiration
public final ImmutableNfTokenOfferObject withExpiration(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionalexpirationattribute.- Parameters:
value- The value for expiration- Returns:
- A modified copy of
thisobject
-
withExpiration
public final ImmutableNfTokenOfferObject withExpiration(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for theexpirationattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for expiration- Returns:
- A modified copy of
thisobject
-
withDestination
Copy the current immutable object by setting a present value for the optionaldestinationattribute.- Parameters:
value- The value for destination- Returns:
- A modified copy of
thisobject
-
withDestination
Copy the current immutable object by setting an optional value for thedestinationattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for destination- Returns:
- A modified copy of
thisobject
-
withOwnerNode
Copy the current immutable object by setting a present value for the optionalownerNodeattribute.- Parameters:
value- The value for ownerNode- Returns:
- A modified copy of
thisobject
-
withOwnerNode
Copy the current immutable object by setting an optional value for theownerNodeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ownerNode- Returns:
- A modified copy of
thisobject
-
withOfferNode
Copy the current immutable object by setting a present value for the optionalofferNodeattribute.- Parameters:
value- The value for offerNode- Returns:
- A modified copy of
thisobject
-
withOfferNode
Copy the current immutable object by setting an optional value for theofferNodeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for offerNode- Returns:
- A modified copy of
thisobject
-
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
-
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 ofImmutableNfTokenOfferObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerEntryType,amount,owner,previousTransactionId,previousTransactionLedgerSequence,nfTokenId,expiration,destination,ownerNode,offerNode,flags,index. -
toString
Prints the immutable valueNfTokenOfferObjectwith attribute values. -
copyOf
Creates an immutable copy of aNfTokenOfferObjectvalue. 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 NfTokenOfferObject instance
-
builder
Creates a builder forImmutableNfTokenOfferObject.ImmutableNfTokenOfferObject.builder() .amount(org.xrpl.xrpl4j.model.transactions.CurrencyAmount) // requiredamount.owner(org.xrpl.xrpl4j.model.transactions.Address) // requiredowner.previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTransactionId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.nfTokenId(org.xrpl.xrpl4j.model.transactions.NfTokenId) // requirednfTokenId.expiration(com.google.common.primitives.UnsignedInteger) // optionalexpiration.destination(org.xrpl.xrpl4j.model.transactions.Address) // optionaldestination.ownerNode(String) // optionalownerNode.offerNode(String) // optionalofferNode.flags(org.xrpl.xrpl4j.model.flags.NfTokenOfferFlags) // requiredflags.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.build();- Returns:
- A new ImmutableNfTokenOfferObject builder
-