Package org.xrpl.xrpl4j.model.client.mpt
Class ImmutableMptHoldersMpToken
java.lang.Object
org.xrpl.xrpl4j.model.client.mpt.ImmutableMptHoldersMpToken
- All Implemented Interfaces:
MptHoldersMpToken
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableMptHoldersMpToken
extends Object
implements MptHoldersMpToken
Immutable implementation of
MptHoldersMpToken.
Use the builder to create immutable instances:
ImmutableMptHoldersMpToken.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMptHoldersMpToken. -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account that owns the MPToken.builder()Creates a builder forImmutableMptHoldersMpToken.static ImmutableMptHoldersMpTokencopyOf(MptHoldersMpToken instance) Creates an immutable copy of aMptHoldersMpTokenvalue.booleanThis instance is equal to all instances ofImmutableMptHoldersMpTokenthat have equal attribute values.flags()TheMpTokenFlagsfor this MPToken.inthashCode()Computes a hash code from attributes:account,flags,mptAmount,lockedAmount,mpTokenIndex.The amount of MPToken that is locked.The balance of this MPToken.The index of this MPToken.toString()Prints the immutable valueMptHoldersMpTokenwith attribute values.withAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.withFlags(MpTokenFlags value) Copy the current immutable object by setting a value for theflagsattribute.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.Copy the current immutable object by setting a value for themptAmountattribute.withMpTokenIndex(Hash256 value) Copy the current immutable object by setting a value for thempTokenIndexattribute.
-
Method Details
-
account
The account that owns the MPToken.- Specified by:
accountin interfaceMptHoldersMpToken- Returns:
- An
Address.
-
flags
TheMpTokenFlagsfor this MPToken.- Specified by:
flagsin interfaceMptHoldersMpToken- Returns:
- An
MpTokenFlags.
-
mptAmount
The balance of this MPToken.- Specified by:
mptAmountin interfaceMptHoldersMpToken- Returns:
- An
MpTokenNumericAmount.
-
lockedAmount
The amount of MPToken that is locked.- Specified by:
lockedAmountin interfaceMptHoldersMpToken- Returns:
- An optionally present
MpTokenNumericAmount.
-
mpTokenIndex
The index of this MPToken.- Specified by:
mpTokenIndexin interfaceMptHoldersMpToken- Returns:
- A
Hash256.
-
withAccount
Copy the current immutable object by setting a value for theaccountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for account- Returns:
- A modified copy of the
thisobject
-
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
-
withMptAmount
Copy the current immutable object by setting a value for themptAmountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mptAmount- 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 ImmutableMptHoldersMpToken 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
-
withMpTokenIndex
Copy the current immutable object by setting a value for thempTokenIndexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mpTokenIndex- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMptHoldersMpTokenthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:account,flags,mptAmount,lockedAmount,mpTokenIndex. -
toString
Prints the immutable valueMptHoldersMpTokenwith attribute values. -
copyOf
Creates an immutable copy of aMptHoldersMpTokenvalue. 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 MptHoldersMpToken instance
-
builder
Creates a builder forImmutableMptHoldersMpToken.ImmutableMptHoldersMpToken.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.flags(org.xrpl.xrpl4j.model.flags.MpTokenFlags) // requiredflags.mptAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // requiredmptAmount.lockedAmount(org.xrpl.xrpl4j.model.transactions.MpTokenNumericAmount) // optionallockedAmount.mpTokenIndex(org.xrpl.xrpl4j.model.transactions.Hash256) // requiredmpTokenIndex.build();- Returns:
- A new ImmutableMptHoldersMpToken builder
-