Package org.xrpl.xrpl4j.model.ledger
Class ImmutableNfToken
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableNfToken
- All Implemented Interfaces:
NfToken
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableNfToken
extends Object
implements NfToken
Immutable implementation of
NfToken.
Use the builder to create immutable instances:
ImmutableNfToken.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableNfToken.Builderbuilder()Creates a builder forImmutableNfToken.static ImmutableNfTokenCreates an immutable copy of aNfTokenvalue.booleanThis instance is equal to all instances ofImmutableNfTokenthat have equal attribute values.inthashCode()Computes a hash code from attributes:nfTokenId,uri.The unique NFTokenID of the token.toString()Prints the immutable valueNfTokenwith attribute values.uri()The URI for the data of the token.final ImmutableNfTokenwithNfTokenId(NfTokenId value) Copy the current immutable object by setting a value for thenfTokenIdattribute.final ImmutableNfTokenwithUri(Optional<? extends NfTokenUri> optional) Copy the current immutable object by setting an optional value for theuriattribute.final ImmutableNfTokenwithUri(NfTokenUri value) Copy the current immutable object by setting a present value for the optionaluriattribute.
-
Method Details
-
nfTokenId
The unique NFTokenID of the token. -
uri
The URI for the data of the token. -
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
-
withUri
Copy the current immutable object by setting a present value for the optionaluriattribute.- Parameters:
value- The value for uri- Returns:
- A modified copy of
thisobject
-
withUri
Copy the current immutable object by setting an optional value for theuriattribute. 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 uri- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableNfTokenthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nfTokenId,uri. -
toString
Prints the immutable valueNfTokenwith attribute values. -
copyOf
Creates an immutable copy of aNfTokenvalue. 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 NfToken instance
-
builder
Creates a builder forImmutableNfToken.ImmutableNfToken.builder() .nfTokenId(org.xrpl.xrpl4j.model.transactions.NfTokenId) // requirednfTokenId.uri(org.xrpl.xrpl4j.model.transactions.NfTokenUri) // optionaluri.build();- Returns:
- A new ImmutableNfToken builder
-