public class Amount extends Number implements SerializedType, Comparable<Amount>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Amount.PrecisionError
Thrown when an Amount is constructed with an invalid value
|
static class |
Amount.Translator |
| 限定符和类型 | 字段和说明 |
|---|---|
static AmountField |
Amount |
static AmountField |
Balance |
static UInt64 |
BINARY_FLAG_IS_IOU |
static UInt64 |
BINARY_FLAG_IS_NON_NEGATIVE_NATIVE |
static AmountField |
ContractValue |
static AmountField |
DeliveredAmount |
static AmountField |
Fee |
static AmountField |
HighLimit |
static AmountField |
LimitAmount |
static AmountField |
LowLimit |
static MathContext |
MATH_CONTEXT |
static BigDecimal |
MAX_NATIVE_VALUE |
static int |
MAXIMUM_IOU_PRECISION |
static int |
MAXIMUM_NATIVE_SCALE |
static BigDecimal |
MIN_NATIVE_VALUE |
static AmountField |
MinimumOffer |
static Amount |
ONE_XRP |
static AmountField |
RippleEscrow |
static AmountField |
SendMax |
static AmountField |
taker_gets_funded |
static AmountField |
taker_pays_funded |
static AmountField |
TakerGets |
static AmountField |
TakerPays |
static Amount.Translator |
translate |
| 构造器和说明 |
|---|
Amount(BigDecimal value)
Amount constructor.
|
Amount(BigDecimal value,
Currency currency,
AccountID issuer)
Amount constructor.
|
Amount(BigDecimal value,
Currency currency,
AccountID issuer,
boolean isNative,
boolean unbounded)
Constructor.
|
Amount(BigDecimal value,
String currency) |
Amount(Currency currency,
AccountID account) |
byteValue, shortValuepublic static final MathContext MATH_CONTEXT
public static final int MAXIMUM_IOU_PRECISION
public static final int MAXIMUM_NATIVE_SCALE
public static final BigDecimal MAX_NATIVE_VALUE
public static final BigDecimal MIN_NATIVE_VALUE
public static final UInt64 BINARY_FLAG_IS_IOU
public static final UInt64 BINARY_FLAG_IS_NON_NEGATIVE_NATIVE
public static final Amount ONE_XRP
public static Amount.Translator translate
public static AmountField Amount
public static AmountField Balance
public static AmountField LimitAmount
public static AmountField DeliveredAmount
public static AmountField TakerPays
public static AmountField TakerGets
public static AmountField LowLimit
public static AmountField HighLimit
public static AmountField Fee
public static AmountField SendMax
public static AmountField MinimumOffer
public static AmountField RippleEscrow
public static AmountField taker_gets_funded
public static AmountField taker_pays_funded
public static AmountField ContractValue
public Amount(BigDecimal value, Currency currency, AccountID issuer)
value - value.currency - currency.issuer - issuer.public Amount(BigDecimal value)
value - BigDecimal value.public Amount(BigDecimal value, Currency currency, AccountID issuer, boolean isNative, boolean unbounded)
value - value.currency - currency.issuer - issuer.isNative - isNative.unbounded - unBounded.public Amount(BigDecimal value, String currency)
public BigDecimal value()
public Currency currency()
public AccountID issuer()
public Issue issue()
public UInt64 mantissa()
public int exponent()
public boolean isNative()
public String currencyString()
public String issuerString()
protected int calculateExponent()
public BigInteger bigIntegerIOUMantissa()
public boolean equals(Amount amt)
public boolean equalsExceptIssuer(Amount amt)
public int compareTo(Amount amount)
compareTo 在接口中 Comparable<Amount>public boolean isZero()
public boolean isNegative()
public boolean isPositive()
public Amount add(BigDecimal augend)
augend - augmend.public Amount subtract(BigDecimal subtrahend)
public Amount multiply(BigDecimal divisor)
public Amount divide(BigDecimal divisor)
public Amount negate()
public Amount abs()
public BigDecimal computeQuality(Amount toExchangeThisWith)
public Amount one()
public Object toJSON()
toJSON 在接口中 SerializedTypepublic org.json.JSONObject toJSONObject()
public byte[] toBytes()
toBytes 在接口中 SerializedTypepublic String toHex()
toHex 在接口中 SerializedTypepublic void toBytesSink(BytesSink to)
toBytesSink 在接口中 SerializedTypepublic Type type()
type 在接口中 SerializedTypepublic static BigDecimal xrpFromDropsMantissa(byte[] mantissa, int sign)
public float floatValue()
floatValue 在类中 Numberpublic double doubleValue()
doubleValue 在类中 Numberpublic BigInteger bigIntegerValue()
public Amount copy()
public String stringRepr()
public String toDropsString()
public String iouTextFull()
public String toTextFull()
public String nativeText()
public String toText()
public String valueText()
public void checkLowerDropBound(BigDecimal val)
public void checkUpperBound(BigDecimal val)
public void checkXRPBounds()
public int significantDigits()
public static void checkDropsValueWhole(String drops)
public static BigDecimal roundValue(BigDecimal value, boolean nativeSrc)
Copyright © 2021. All rights reserved.