public final class HighPrecisionMoneyImpl extends Base implements javax.money.MonetaryAmount
MoneyImpl
, this class can be used when the user intends to pass to high precision
price, the fractions taken into account can be specified in fractions digits, and it allows to fractionDigits up or down
the default precision for a particular price.Modifier and Type | Method and Description |
---|---|
javax.money.MonetaryAmount |
abs() |
javax.money.MonetaryAmount |
add(javax.money.MonetaryAmount amount) |
int |
compareTo(javax.money.MonetaryAmount o) |
static javax.money.CurrencyUnit |
createCurrencyByCode(String currencyCode) |
javax.money.MonetaryAmount |
divide(double divisor) |
javax.money.MonetaryAmount |
divide(long divisor) |
javax.money.MonetaryAmount |
divide(Number divisor) |
javax.money.MonetaryAmount[] |
divideAndRemainder(double divisor) |
javax.money.MonetaryAmount[] |
divideAndRemainder(long divisor) |
javax.money.MonetaryAmount[] |
divideAndRemainder(Number divisor) |
javax.money.MonetaryAmount |
divideToIntegralValue(double divisor) |
javax.money.MonetaryAmount |
divideToIntegralValue(long divisor) |
javax.money.MonetaryAmount |
divideToIntegralValue(Number divisor) |
boolean |
equals(Object obj) |
javax.money.MonetaryContext |
getContext() |
javax.money.CurrencyUnit |
getCurrency() |
javax.money.MonetaryAmountFactory<? extends javax.money.MonetaryAmount> |
getFactory() |
int |
getFractionDigits() |
javax.money.NumberValue |
getNumber() |
int |
hashCode() |
boolean |
isEqualTo(javax.money.MonetaryAmount amount) |
boolean |
isGreaterThan(javax.money.MonetaryAmount amount) |
boolean |
isGreaterThanOrEqualTo(javax.money.MonetaryAmount amount) |
boolean |
isLessThan(javax.money.MonetaryAmount amount) |
boolean |
isLessThanOrEqualTo(javax.money.MonetaryAmount amt) |
boolean |
isNegative() |
boolean |
isNegativeOrZero() |
boolean |
isPositive() |
boolean |
isPositiveOrZero() |
boolean |
isZero() |
javax.money.MonetaryAmount |
multiply(double multiplicand) |
javax.money.MonetaryAmount |
multiply(long multiplicand) |
javax.money.MonetaryAmount |
multiply(Number multiplicand) |
javax.money.MonetaryAmount |
negate() |
static javax.money.MonetaryAmount |
of(BigDecimal money,
javax.money.CurrencyUnit currency,
int fractionDigits) |
static javax.money.MonetaryAmount |
of(BigDecimal money,
String currency,
int fractionDigits) |
static javax.money.MonetaryAmount |
of(javax.money.MonetaryAmount money,
int fractionDigits) |
javax.money.MonetaryAmount |
plus() |
<R> R |
query(javax.money.MonetaryQuery<R> query) |
javax.money.MonetaryAmount |
remainder(double divisor) |
javax.money.MonetaryAmount |
remainder(long divisor) |
javax.money.MonetaryAmount |
remainder(Number divisor) |
javax.money.MonetaryAmount |
scaleByPowerOfTen(int power) |
int |
signum() |
javax.money.MonetaryAmount |
stripTrailingZeros() |
javax.money.MonetaryAmount |
subtract(javax.money.MonetaryAmount amount) |
String |
toString() |
javax.money.MonetaryAmount |
with(javax.money.MonetaryOperator operator) |
public javax.money.MonetaryContext getContext()
getContext
in interface javax.money.MonetaryAmount
public <R> R query(javax.money.MonetaryQuery<R> query)
query
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount with(javax.money.MonetaryOperator operator)
with
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmountFactory<? extends javax.money.MonetaryAmount> getFactory()
getFactory
in interface javax.money.MonetaryAmount
public boolean isGreaterThan(javax.money.MonetaryAmount amount)
isGreaterThan
in interface javax.money.MonetaryAmount
public boolean isGreaterThanOrEqualTo(javax.money.MonetaryAmount amount)
isGreaterThanOrEqualTo
in interface javax.money.MonetaryAmount
public boolean isLessThan(javax.money.MonetaryAmount amount)
isLessThan
in interface javax.money.MonetaryAmount
public boolean isLessThanOrEqualTo(javax.money.MonetaryAmount amt)
isLessThanOrEqualTo
in interface javax.money.MonetaryAmount
public boolean isEqualTo(javax.money.MonetaryAmount amount)
isEqualTo
in interface javax.money.MonetaryAmount
public boolean isNegative()
isNegative
in interface javax.money.MonetaryAmount
public boolean isNegativeOrZero()
isNegativeOrZero
in interface javax.money.MonetaryAmount
public boolean isPositive()
isPositive
in interface javax.money.MonetaryAmount
public boolean isPositiveOrZero()
isPositiveOrZero
in interface javax.money.MonetaryAmount
public boolean isZero()
isZero
in interface javax.money.MonetaryAmount
public int signum()
signum
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount add(javax.money.MonetaryAmount amount)
add
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount subtract(javax.money.MonetaryAmount amount)
subtract
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount multiply(long multiplicand)
multiply
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount multiply(double multiplicand)
multiply
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount multiply(Number multiplicand)
multiply
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount divide(long divisor)
divide
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount divide(double divisor)
divide
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount divide(Number divisor)
divide
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount remainder(long divisor)
remainder
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount remainder(double divisor)
remainder
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount remainder(Number divisor)
remainder
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount[] divideAndRemainder(long divisor)
divideAndRemainder
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount[] divideAndRemainder(double divisor)
divideAndRemainder
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount[] divideAndRemainder(Number divisor)
divideAndRemainder
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount divideToIntegralValue(long divisor)
divideToIntegralValue
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount divideToIntegralValue(double divisor)
divideToIntegralValue
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount divideToIntegralValue(Number divisor)
divideToIntegralValue
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount scaleByPowerOfTen(int power)
scaleByPowerOfTen
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount abs()
abs
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount negate()
negate
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount plus()
plus
in interface javax.money.MonetaryAmount
public javax.money.MonetaryAmount stripTrailingZeros()
stripTrailingZeros
in interface javax.money.MonetaryAmount
public javax.money.CurrencyUnit getCurrency()
getCurrency
in interface javax.money.CurrencySupplier
public javax.money.NumberValue getNumber()
getNumber
in interface javax.money.NumberSupplier
public int compareTo(javax.money.MonetaryAmount o)
compareTo
in interface Comparable<javax.money.MonetaryAmount>
public static javax.money.MonetaryAmount of(javax.money.MonetaryAmount money, int fractionDigits)
public static javax.money.MonetaryAmount of(BigDecimal money, javax.money.CurrencyUnit currency, int fractionDigits)
public static javax.money.MonetaryAmount of(BigDecimal money, String currency, int fractionDigits)
public int getFractionDigits()
public static javax.money.CurrencyUnit createCurrencyByCode(String currencyCode)