Class ImmutableMptCurrencyAmount
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableMptCurrencyAmount
- All Implemented Interfaces:
CurrencyAmount,MptCurrencyAmount
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableMptCurrencyAmount
extends Object
implements MptCurrencyAmount
Immutable implementation of
MptCurrencyAmount.
Use the builder to create immutable instances:
ImmutableMptCurrencyAmount.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMptCurrencyAmount. -
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.CurrencyAmount
MAX_XRP, MAX_XRP_BD, MAX_XRP_IN_DROPS, ONE_XRP_IN_DROPS -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableMptCurrencyAmount.static ImmutableMptCurrencyAmountcopyOf(MptCurrencyAmount instance) Creates an immutable copy of aMptCurrencyAmountvalue.booleanThis instance is equal to all instances ofImmutableMptCurrencyAmountthat have equal attribute values.inthashCode()Computes a hash code from attributes:mptIssuanceId,value.booleanIndicates whether this amount is positive or negative.toString()Prints the immutable valueMptCurrencyAmountwith attribute values.value()Copy the current immutable object by setting a value for themptIssuanceIdattribute.Copy the current immutable object by setting a value for thevalueattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.xrpl.xrpl4j.model.transactions.CurrencyAmount
handle, mapMethods inherited from interface org.xrpl.xrpl4j.model.transactions.MptCurrencyAmount
unsignedLongValue
-
Method Details
-
mptIssuanceId
- Specified by:
mptIssuanceIdin interfaceMptCurrencyAmount- Returns:
- The value of the
mptIssuanceIdattribute
-
value
- Specified by:
valuein interfaceMptCurrencyAmount- Returns:
- The value of the
valueattribute
-
isNegative
public boolean isNegative()Indicates whether this amount is positive or negative.- Specified by:
isNegativein interfaceCurrencyAmount- Specified by:
isNegativein interfaceMptCurrencyAmount- Returns:
trueif this amount is negative;falseotherwise (i.e., if the value is 0 or positive).
-
withMptIssuanceId
Copy the current immutable object by setting a value for themptIssuanceIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mptIssuanceId- Returns:
- A modified copy of the
thisobject
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMptCurrencyAmountthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:mptIssuanceId,value. -
toString
Prints the immutable valueMptCurrencyAmountwith attribute values. -
copyOf
Creates an immutable copy of aMptCurrencyAmountvalue. 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 MptCurrencyAmount instance
-
builder
Creates a builder forImmutableMptCurrencyAmount.ImmutableMptCurrencyAmount.builder() .mptIssuanceId(org.xrpl.xrpl4j.model.transactions.MpTokenIssuanceId) // requiredmptIssuanceId.value(String) // requiredvalue.build();- Returns:
- A new ImmutableMptCurrencyAmount builder
-