Class ImmutableMpTokenIssuanceObject

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableMpTokenIssuanceObject
All Implemented Interfaces:
LedgerObject, MpTokenIssuanceObject

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

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

  • Method Details

    • ledgerEntryType

      public LedgerObject.LedgerEntryType ledgerEntryType()
      Specified by:
      ledgerEntryType in interface MpTokenIssuanceObject
      Returns:
      The computed-at-construction value of the ledgerEntryType attribute
    • flags

      public MpTokenIssuanceFlags flags()
      The MpTokenIssuanceFlags for this issuance.
      Specified by:
      flags in interface MpTokenIssuanceObject
      Returns:
      An MpTokenIssuanceFlags.
    • issuer

      public Address issuer()
      The Address of the issuer of this token.
      Specified by:
      issuer in interface MpTokenIssuanceObject
      Returns:
      An Address.
    • sequence

      public com.google.common.primitives.UnsignedInteger sequence()
      A 32-bit unsigned integer that is used to ensure issuances from a given sender may only ever exist once, even if an issuance is later deleted. Whenever a new issuance is created, this value must match the account's current Sequence number.
      Specified by:
      sequence in interface MpTokenIssuanceObject
      Returns:
      An UnsignedInteger representing the account sequence number.
    • transferFee

      public TransferFee transferFee()
      The fee that this issuance charges for secondary sales of the token.
      Specified by:
      transferFee in interface MpTokenIssuanceObject
      Returns:
      A TransferFee.
    • assetScale

      public AssetScale assetScale()
      The AssetScale of the issuance.
      Specified by:
      assetScale in interface MpTokenIssuanceObject
      Returns:
      An AssetScale.
    • maximumAmount

      public Optional<MpTokenNumericAmount> maximumAmount()
      The maximum number of this issuance that can be distributed to non-issuing accounts.
      Specified by:
      maximumAmount in interface MpTokenIssuanceObject
      Returns:
      An optionally present MpTokenNumericAmount.
    • outstandingAmount

      public MpTokenNumericAmount outstandingAmount()
      The sum of all token amounts that have been minted to all token holders.
      Specified by:
      outstandingAmount in interface MpTokenIssuanceObject
      Returns:
      An MpTokenNumericAmount.
    • lockedAmount

      public Optional<MpTokenNumericAmount> lockedAmount()
      The total amount of this MPT that is locked in escrows across all holders. This field tracks the aggregate amount held in escrows for this issuance. Note that outstandingAmount() remains unchanged during escrow operations.
      Specified by:
      lockedAmount in interface MpTokenIssuanceObject
      Returns:
      An optionally-present MpTokenNumericAmount.
    • mpTokenMetadata

      public Optional<MpTokenMetadata> mpTokenMetadata()
      Arbitrary hex-encoded metadata about this issuance.
      Specified by:
      mpTokenMetadata in interface MpTokenIssuanceObject
      Returns:
      An optionally-present MpTokenMetadata.
    • previousTransactionId

      public Hash256 previousTransactionId()
      The identifying hash of the transaction that most recently modified this object.
      Specified by:
      previousTransactionId in interface MpTokenIssuanceObject
      Returns:
      A Hash256 containing 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:
      previousTransactionLedgerSequence in interface MpTokenIssuanceObject
      Returns:
      An UnsignedInteger representing the previous transaction ledger sequence.
    • ownerNode

      public Optional<String> ownerNode()
      A hint indicating which page of the 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:
      ownerNode in interface MpTokenIssuanceObject
      Returns:
      An Optional of type String containing the owner node hint.
    • index

      public Hash256 index()
      The unique ID of this MpTokenIssuanceObject.
      Specified by:
      index in interface MpTokenIssuanceObject
      Returns:
      A Hash256 containing the ID.
    • mpTokenIssuanceId

      public Optional<MpTokenIssuanceId> mpTokenIssuanceId()
      The MpTokenIssuanceId of the issuance. Only present in responses to ledger_data and account_objects RPC calls.
      Specified by:
      mpTokenIssuanceId in interface MpTokenIssuanceObject
      Returns:
      An Optional MpTokenIssuanceId.
    • withFlags

      public final ImmutableMpTokenIssuanceObject withFlags(MpTokenIssuanceFlags value)
      Copy the current immutable object by setting a value for the flags attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for flags
      Returns:
      A modified copy of the this object
    • withIssuer

      public final ImmutableMpTokenIssuanceObject withIssuer(Address value)
      Copy the current immutable object by setting a value for the issuer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for issuer
      Returns:
      A modified copy of the this object
    • withSequence

      public final ImmutableMpTokenIssuanceObject withSequence(com.google.common.primitives.UnsignedInteger value)
      Copy the current immutable object by setting a value for the sequence attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sequence
      Returns:
      A modified copy of the this object
    • withTransferFee

      public final ImmutableMpTokenIssuanceObject withTransferFee(TransferFee value)
      Copy the current immutable object by setting a value for the transferFee attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for transferFee
      Returns:
      A modified copy of the this object
    • withAssetScale

      public final ImmutableMpTokenIssuanceObject withAssetScale(AssetScale value)
      Copy the current immutable object by setting a value for the assetScale attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for assetScale
      Returns:
      A modified copy of the this object
    • withMaximumAmount

      public final ImmutableMpTokenIssuanceObject withMaximumAmount(MpTokenNumericAmount value)
      Copy the current immutable object by setting a present value for the optional maximumAmount attribute.
      Parameters:
      value - The value for maximumAmount
      Returns:
      A modified copy of this object
    • withMaximumAmount

      public final ImmutableMpTokenIssuanceObject withMaximumAmount(Optional<? extends MpTokenNumericAmount> optional)
      Copy the current immutable object by setting an optional value for the maximumAmount 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 maximumAmount
      Returns:
      A modified copy of this object
    • withOutstandingAmount

      public final ImmutableMpTokenIssuanceObject withOutstandingAmount(MpTokenNumericAmount value)
      Copy the current immutable object by setting a value for the outstandingAmount attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for outstandingAmount
      Returns:
      A modified copy of the this object
    • withLockedAmount

      public final ImmutableMpTokenIssuanceObject withLockedAmount(MpTokenNumericAmount value)
      Copy the current immutable object by setting a present value for the optional lockedAmount attribute.
      Parameters:
      value - The value for lockedAmount
      Returns:
      A modified copy of this object
    • withLockedAmount

      public final ImmutableMpTokenIssuanceObject withLockedAmount(Optional<? extends MpTokenNumericAmount> optional)
      Copy the current immutable object by setting an optional value for the lockedAmount 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 lockedAmount
      Returns:
      A modified copy of this object
    • withMpTokenMetadata

      public final ImmutableMpTokenIssuanceObject withMpTokenMetadata(MpTokenMetadata value)
      Copy the current immutable object by setting a present value for the optional mpTokenMetadata attribute.
      Parameters:
      value - The value for mpTokenMetadata
      Returns:
      A modified copy of this object
    • withMpTokenMetadata

      public final ImmutableMpTokenIssuanceObject withMpTokenMetadata(Optional<? extends MpTokenMetadata> optional)
      Copy the current immutable object by setting an optional value for the mpTokenMetadata 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 mpTokenMetadata
      Returns:
      A modified copy of this object
    • withPreviousTransactionId

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

      public final ImmutableMpTokenIssuanceObject withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value)
      Copy the current immutable object by setting a value for the previousTransactionLedgerSequence attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for previousTransactionLedgerSequence
      Returns:
      A modified copy of the this object
    • withOwnerNode

      public final ImmutableMpTokenIssuanceObject withOwnerNode(String value)
      Copy the current immutable object by setting a present value for the optional ownerNode attribute.
      Parameters:
      value - The value for ownerNode
      Returns:
      A modified copy of this object
    • withOwnerNode

      public final ImmutableMpTokenIssuanceObject withOwnerNode(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the ownerNode attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for ownerNode
      Returns:
      A modified copy of this object
    • withIndex

      public final ImmutableMpTokenIssuanceObject 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
    • withMpTokenIssuanceId

      public final ImmutableMpTokenIssuanceObject withMpTokenIssuanceId(MpTokenIssuanceId value)
      Copy the current immutable object by setting a present value for the optional mpTokenIssuanceId attribute.
      Parameters:
      value - The value for mpTokenIssuanceId
      Returns:
      A modified copy of this object
    • withMpTokenIssuanceId

      public final ImmutableMpTokenIssuanceObject withMpTokenIssuanceId(Optional<? extends MpTokenIssuanceId> optional)
      Copy the current immutable object by setting an optional value for the mpTokenIssuanceId 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 mpTokenIssuanceId
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableMpTokenIssuanceObject 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, flags, issuer, sequence, transferFee, assetScale, maximumAmount, outstandingAmount, lockedAmount, mpTokenMetadata, previousTransactionId, previousTransactionLedgerSequence, ownerNode, index, mpTokenIssuanceId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableMpTokenIssuanceObject.Builder builder()
      Creates a builder for ImmutableMpTokenIssuanceObject.
       ImmutableMpTokenIssuanceObject.builder()
          .flags(org.xrpl.xrpl4j.model.flags.MpTokenIssuanceFlags) // required flags
          .issuer(org.xrpl.xrpl4j.model.transactions.Address) // required issuer
          .sequence(com.google.common.primitives.UnsignedInteger) // required sequence
          .transferFee(org.xrpl.xrpl4j.model.transactions.TransferFee) // optional transferFee
          .assetScale(org.xrpl.xrpl4j.model.transactions.AssetScale) // optional assetScale
          .maximumAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // optional maximumAmount
          .outstandingAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // required outstandingAmount
          .lockedAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // optional lockedAmount
          .mpTokenMetadata(org.xrpl.xrpl4j.model.transactions.MpTokenMetadata) // optional mpTokenMetadata
          .previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // required previousTransactionId
          .previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // required previousTransactionLedgerSequence
          .ownerNode(String) // optional ownerNode
          .index(org.xrpl.xrpl4j.model.transactions.Hash256) // required index
          .mpTokenIssuanceId(org.xrpl.xrpl4j.model.transactions.MpTokenIssuanceId) // optional mpTokenIssuanceId
          .build();
       
      Returns:
      A new ImmutableMpTokenIssuanceObject builder