Class ImmutableNfTokenWrapper

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableNfTokenWrapper
All Implemented Interfaces:
NfTokenWrapper

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableNfTokenWrapper extends Object implements NfTokenWrapper
Immutable implementation of NfTokenWrapper.

Use the builder to create immutable instances: ImmutableNfTokenWrapper.builder().

  • Method Details

    • nfToken

      public NfToken nfToken()
      The NfToken that this wrapper wraps.
      Specified by:
      nfToken in interface NfTokenWrapper
      Returns:
      A NfToken.
    • withNfToken

      public final ImmutableNfTokenWrapper withNfToken(NfToken value)
      Copy the current immutable object by setting a value for the nfToken attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for nfToken
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableNfTokenWrapper that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: nfToken.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value NfTokenWrapper with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableNfTokenWrapper copyOf(NfTokenWrapper instance)
      Creates an immutable copy of a NfTokenWrapper value. 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 NfTokenWrapper instance
    • builder

      public static ImmutableNfTokenWrapper.Builder builder()
      Creates a builder for ImmutableNfTokenWrapper.
       ImmutableNfTokenWrapper.builder()
          .nfToken(org.xrpl.xrpl4j.model.ledger.NfToken) // required nfToken
          .build();
       
      Returns:
      A new ImmutableNfTokenWrapper builder