Package org.xrpl.xrpl4j.model.ledger
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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMpTokenIssuanceObject.Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionTheAssetScaleof the issuance.builder()Creates a builder forImmutableMpTokenIssuanceObject.copyOf(MpTokenIssuanceObject instance) Creates an immutable copy of aMpTokenIssuanceObjectvalue.booleanThis instance is equal to all instances ofImmutableMpTokenIssuanceObjectthat have equal attribute values.flags()TheMpTokenIssuanceFlagsfor this issuance.inthashCode()Computes a hash code from attributes:ledgerEntryType,flags,issuer,sequence,transferFee,assetScale,maximumAmount,outstandingAmount,lockedAmount,mpTokenMetadata,previousTransactionId,previousTransactionLedgerSequence,ownerNode,index,mpTokenIssuanceId.index()The unique ID of thisMpTokenIssuanceObject.issuer()TheAddressof the issuer of this token.The total amount of this MPT that is locked in escrows across all holders.The maximum number of this issuance that can be distributed to non-issuing accounts.TheMpTokenIssuanceIdof the issuance.Arbitrary hex-encoded metadata about this issuance.The sum of all token amounts that have been minted to all token holders.A hint indicating which page of the 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.com.google.common.primitives.UnsignedIntegersequence()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.toString()Prints the immutable valueMpTokenIssuanceObjectwith attribute values.The fee that this issuance charges for secondary sales of the token.withAssetScale(AssetScale value) Copy the current immutable object by setting a value for theassetScaleattribute.withFlags(MpTokenIssuanceFlags value) Copy the current immutable object by setting a value for theflagsattribute.Copy the current immutable object by setting a value for theindexattribute.withIssuer(Address value) Copy the current immutable object by setting a value for theissuerattribute.withLockedAmount(Optional<? extends MpTokenNumericAmount> optional) Copy the current immutable object by setting an optional value for thelockedAmountattribute.Copy the current immutable object by setting a present value for the optionallockedAmountattribute.withMaximumAmount(Optional<? extends MpTokenNumericAmount> optional) Copy the current immutable object by setting an optional value for themaximumAmountattribute.Copy the current immutable object by setting a present value for the optionalmaximumAmountattribute.withMpTokenIssuanceId(Optional<? extends MpTokenIssuanceId> optional) Copy the current immutable object by setting an optional value for thempTokenIssuanceIdattribute.Copy the current immutable object by setting a present value for the optionalmpTokenIssuanceIdattribute.withMpTokenMetadata(Optional<? extends MpTokenMetadata> optional) Copy the current immutable object by setting an optional value for thempTokenMetadataattribute.Copy the current immutable object by setting a present value for the optionalmpTokenMetadataattribute.Copy the current immutable object by setting a value for theoutstandingAmountattribute.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.withSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thesequenceattribute.withTransferFee(TransferFee value) Copy the current immutable object by setting a value for thetransferFeeattribute.
-
Method Details
-
ledgerEntryType
- Specified by:
ledgerEntryTypein interfaceMpTokenIssuanceObject- Returns:
- The computed-at-construction value of the
ledgerEntryTypeattribute
-
flags
TheMpTokenIssuanceFlagsfor this issuance.- Specified by:
flagsin interfaceMpTokenIssuanceObject- Returns:
- An
MpTokenIssuanceFlags.
-
issuer
TheAddressof the issuer of this token.- Specified by:
issuerin interfaceMpTokenIssuanceObject- 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:
sequencein interfaceMpTokenIssuanceObject- Returns:
- An
UnsignedIntegerrepresenting the account sequence number.
-
transferFee
The fee that this issuance charges for secondary sales of the token.- Specified by:
transferFeein interfaceMpTokenIssuanceObject- Returns:
- A
TransferFee.
-
assetScale
TheAssetScaleof the issuance.- Specified by:
assetScalein interfaceMpTokenIssuanceObject- Returns:
- An
AssetScale.
-
maximumAmount
The maximum number of this issuance that can be distributed to non-issuing accounts.- Specified by:
maximumAmountin interfaceMpTokenIssuanceObject- Returns:
- An optionally present
MpTokenNumericAmount.
-
outstandingAmount
The sum of all token amounts that have been minted to all token holders.- Specified by:
outstandingAmountin interfaceMpTokenIssuanceObject- Returns:
- An
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 thatoutstandingAmount()remains unchanged during escrow operations.- Specified by:
lockedAmountin interfaceMpTokenIssuanceObject- Returns:
- An optionally-present
MpTokenNumericAmount.
-
mpTokenMetadata
Arbitrary hex-encoded metadata about this issuance.- Specified by:
mpTokenMetadatain interfaceMpTokenIssuanceObject- Returns:
- An optionally-present
MpTokenMetadata.
-
previousTransactionId
The identifying hash of the transaction that most recently modified this object.- Specified by:
previousTransactionIdin interfaceMpTokenIssuanceObject- 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 interfaceMpTokenIssuanceObject- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
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:
ownerNodein interfaceMpTokenIssuanceObject- Returns:
- An
Optionalof typeStringcontaining the owner node hint.
-
index
The unique ID of thisMpTokenIssuanceObject.- Specified by:
indexin interfaceMpTokenIssuanceObject- Returns:
- A
Hash256containing the ID.
-
mpTokenIssuanceId
TheMpTokenIssuanceIdof the issuance. Only present in responses toledger_dataandaccount_objectsRPC calls.- Specified by:
mpTokenIssuanceIdin interfaceMpTokenIssuanceObject- Returns:
- An
OptionalMpTokenIssuanceId.
-
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
-
withIssuer
Copy the current immutable object by setting a value for theissuerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for issuer- Returns:
- A modified copy of the
thisobject
-
withSequence
public final ImmutableMpTokenIssuanceObject withSequence(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a value for thesequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sequence- Returns:
- A modified copy of the
thisobject
-
withTransferFee
Copy the current immutable object by setting a value for thetransferFeeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for transferFee- Returns:
- A modified copy of the
thisobject
-
withAssetScale
Copy the current immutable object by setting a value for theassetScaleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for assetScale- Returns:
- A modified copy of the
thisobject
-
withMaximumAmount
Copy the current immutable object by setting a present value for the optionalmaximumAmountattribute.- Parameters:
value- The value for maximumAmount- Returns:
- A modified copy of
thisobject
-
withMaximumAmount
public final ImmutableMpTokenIssuanceObject withMaximumAmount(Optional<? extends MpTokenNumericAmount> optional) Copy the current immutable object by setting an optional value for themaximumAmountattribute. 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 maximumAmount- Returns:
- A modified copy of
thisobject
-
withOutstandingAmount
Copy the current immutable object by setting a value for theoutstandingAmountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for outstandingAmount- Returns:
- A modified copy of the
thisobject
-
withLockedAmount
Copy the current immutable object by setting a present value for the optionallockedAmountattribute.- Parameters:
value- The value for lockedAmount- Returns:
- A modified copy of
thisobject
-
withLockedAmount
public final ImmutableMpTokenIssuanceObject withLockedAmount(Optional<? extends MpTokenNumericAmount> optional) Copy the current immutable object by setting an optional value for thelockedAmountattribute. 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 lockedAmount- Returns:
- A modified copy of
thisobject
-
withMpTokenMetadata
Copy the current immutable object by setting a present value for the optionalmpTokenMetadataattribute.- Parameters:
value- The value for mpTokenMetadata- Returns:
- A modified copy of
thisobject
-
withMpTokenMetadata
public final ImmutableMpTokenIssuanceObject withMpTokenMetadata(Optional<? extends MpTokenMetadata> optional) Copy the current immutable object by setting an optional value for thempTokenMetadataattribute. 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 mpTokenMetadata- Returns:
- A modified copy of
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 ImmutableMpTokenIssuanceObject 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
-
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
-
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
-
withMpTokenIssuanceId
Copy the current immutable object by setting a present value for the optionalmpTokenIssuanceIdattribute.- Parameters:
value- The value for mpTokenIssuanceId- Returns:
- A modified copy of
thisobject
-
withMpTokenIssuanceId
public final ImmutableMpTokenIssuanceObject withMpTokenIssuanceId(Optional<? extends MpTokenIssuanceId> optional) Copy the current immutable object by setting an optional value for thempTokenIssuanceIdattribute. 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 mpTokenIssuanceId- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableMpTokenIssuanceObjectthat have equal attribute values. -
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. -
toString
Prints the immutable valueMpTokenIssuanceObjectwith attribute values. -
copyOf
Creates an immutable copy of aMpTokenIssuanceObjectvalue. 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
Creates a builder forImmutableMpTokenIssuanceObject.ImmutableMpTokenIssuanceObject.builder() .flags(org.xrpl.xrpl4j.model.flags.MpTokenIssuanceFlags) // requiredflags.issuer(org.xrpl.xrpl4j.model.transactions.Address) // requiredissuer.sequence(com.google.common.primitives.UnsignedInteger) // requiredsequence.transferFee(org.xrpl.xrpl4j.model.transactions.TransferFee) // optionaltransferFee.assetScale(org.xrpl.xrpl4j.model.transactions.AssetScale) // optionalassetScale.maximumAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // optionalmaximumAmount.outstandingAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // requiredoutstandingAmount.lockedAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // optionallockedAmount.mpTokenMetadata(org.xrpl.xrpl4j.model.transactions.MpTokenMetadata) // optionalmpTokenMetadata.previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredpreviousTransactionId.previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // requiredpreviousTransactionLedgerSequence.ownerNode(String) // optionalownerNode.index(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredindex.mpTokenIssuanceId(org.xrpl.xrpl4j.model.transactions.MpTokenIssuanceId) // optionalmpTokenIssuanceId.build();- Returns:
- A new ImmutableMpTokenIssuanceObject builder
-