Class ImmutableNfTokenPageObject

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableNfTokenPageObject
All Implemented Interfaces:
LedgerObject, NfTokenPageObject

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

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

  • Method Details

    • ledgerEntryType

      public LedgerObject.LedgerEntryType ledgerEntryType()
      The type of ledger object, which will always be "NFTokenPage" in this case.
      Specified by:
      ledgerEntryType in interface NfTokenPageObject
      Returns:
      Always returns LedgerObject.LedgerEntryType.ACCOUNT_ROOT.
    • nfTokens

      public com.google.common.collect.ImmutableList<NfTokenWrapper> nfTokens()
      The collection of NFToken objects contained in this NFTokenPage object. This specification places an upper bound of 32 NFToken objects per page. Objects are sorted from low to high with the NFTokenID used as the sorting parameter.
      Specified by:
      nfTokens in interface NfTokenPageObject
      Returns:
      A List of NfTokens.
    • nextPageMin

      public Optional<Hash256> nextPageMin()
      The locator of the next page, if any.
      Specified by:
      nextPageMin in interface NfTokenPageObject
      Returns:
      A Hash256 containing the ID of the next page, or Optional.empty() if there is no next page.
    • previousPageMin

      public Optional<Hash256> previousPageMin()
      The locator of the previous page, if any.
      Specified by:
      previousPageMin in interface NfTokenPageObject
      Returns:
      A Hash256 containing the ID of the previous page, or Optional.empty() if there is no previous page.
    • previousTransactionId

      public Optional<Hash256> previousTransactionId()
      Identifies the transaction ID of the transaction that most recently modified this NFTokenPage object.
      Specified by:
      previousTransactionId in interface NfTokenPageObject
      Returns:
      An optionally-present Hash256.
    • previousTransactionLedgerSequence

      public Optional<LedgerIndex> previousTransactionLedgerSequence()
      The sequence of the ledger that contains the transaction that most recently modified this NFTokenPage object.
      Specified by:
      previousTransactionLedgerSequence in interface NfTokenPageObject
      Returns:
      A LedgerIndex.
    • index

      public Hash256 index()
      The unique ID of this NfTokenPageObject ledger object.
      Specified by:
      index in interface NfTokenPageObject
      Returns:
      A Hash256.
      See Also:
      • "https://xrpl.org/ledger-object-ids.html"
    • withNfTokens

      public final ImmutableNfTokenPageObject withNfTokens(NfTokenWrapper... elements)
      Copy the current immutable object with elements that replace the content of nfTokens.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withNfTokens

      public final ImmutableNfTokenPageObject withNfTokens(Iterable<? extends NfTokenWrapper> elements)
      Copy the current immutable object with elements that replace the content of nfTokens. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of nfTokens elements to set
      Returns:
      A modified copy of this object
    • withNextPageMin

      public final ImmutableNfTokenPageObject withNextPageMin(Hash256 value)
      Copy the current immutable object by setting a present value for the optional nextPageMin attribute.
      Parameters:
      value - The value for nextPageMin
      Returns:
      A modified copy of this object
    • withNextPageMin

      public final ImmutableNfTokenPageObject withNextPageMin(Optional<? extends Hash256> optional)
      Copy the current immutable object by setting an optional value for the nextPageMin attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for nextPageMin
      Returns:
      A modified copy of this object
    • withPreviousPageMin

      public final ImmutableNfTokenPageObject withPreviousPageMin(Hash256 value)
      Copy the current immutable object by setting a present value for the optional previousPageMin attribute.
      Parameters:
      value - The value for previousPageMin
      Returns:
      A modified copy of this object
    • withPreviousPageMin

      public final ImmutableNfTokenPageObject withPreviousPageMin(Optional<? extends Hash256> optional)
      Copy the current immutable object by setting an optional value for the previousPageMin attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for previousPageMin
      Returns:
      A modified copy of this object
    • withPreviousTransactionId

      public final ImmutableNfTokenPageObject withPreviousTransactionId(Hash256 value)
      Copy the current immutable object by setting a present value for the optional previousTransactionId attribute.
      Parameters:
      value - The value for previousTransactionId
      Returns:
      A modified copy of this object
    • withPreviousTransactionId

      public final ImmutableNfTokenPageObject withPreviousTransactionId(Optional<? extends Hash256> optional)
      Copy the current immutable object by setting an optional value for the previousTransactionId attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for previousTransactionId
      Returns:
      A modified copy of this object
    • withPreviousTransactionLedgerSequence

      public final ImmutableNfTokenPageObject withPreviousTransactionLedgerSequence(LedgerIndex value)
      Copy the current immutable object by setting a present value for the optional previousTransactionLedgerSequence attribute.
      Parameters:
      value - The value for previousTransactionLedgerSequence
      Returns:
      A modified copy of this object
    • withPreviousTransactionLedgerSequence

      public final ImmutableNfTokenPageObject withPreviousTransactionLedgerSequence(Optional<? extends LedgerIndex> optional)
      Copy the current immutable object by setting an optional value for the previousTransactionLedgerSequence attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for previousTransactionLedgerSequence
      Returns:
      A modified copy of this object
    • withIndex

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableNfTokenPageObject 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: ledgerEntryType, nfTokens, nextPageMin, previousPageMin, previousTransactionId, previousTransactionLedgerSequence, index.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableNfTokenPageObject copyOf(NfTokenPageObject instance)
      Creates an immutable copy of a NfTokenPageObject 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 NfTokenPageObject instance
    • builder

      public static ImmutableNfTokenPageObject.Builder builder()
      Creates a builder for ImmutableNfTokenPageObject.
       ImmutableNfTokenPageObject.builder()
          .addNfTokens|addAllNfTokens(org.xrpl.xrpl4j.model.ledger.NfTokenWrapper) // nfTokens elements
          .nextPageMin(org.xrpl.xrpl4j.model.transactions.Hash256) // optional nextPageMin
          .previousPageMin(org.xrpl.xrpl4j.model.transactions.Hash256) // optional previousPageMin
          .previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // optional previousTransactionId
          .previousTransactionLedgerSequence(org.xrpl.xrpl4j.model.client.common.LedgerIndex) // optional previousTransactionLedgerSequence
          .index(org.xrpl.xrpl4j.model.transactions.Hash256) // required index
          .build();
       
      Returns:
      A new ImmutableNfTokenPageObject builder