public final class MoneyImpl extends Base implements javax.money.MonetaryAmount
Modifier and Type | Method and Description |
---|---|
javax.money.MonetaryAmount |
abs() |
javax.money.MonetaryAmount |
add(javax.money.MonetaryAmount amount) |
static Long |
centAmountOf(javax.money.MonetaryAmount monetaryAmount) |
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() |
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 amount,
javax.money.CurrencyUnit currency) |
static javax.money.MonetaryAmount |
of(BigDecimal amount,
String currencyCode) |
static javax.money.MonetaryAmount |
of(int amount,
javax.money.CurrencyUnit currencyUnit) |
static javax.money.MonetaryAmount |
of(javax.money.MonetaryAmount money) |
static javax.money.MonetaryAmount |
of(String amount,
javax.money.CurrencyUnit currencyUnit) |
static javax.money.MonetaryAmount |
of(String value,
String currencyCode) |
static javax.money.MonetaryAmount |
ofCents(long centAmount,
javax.money.CurrencyUnit currencyUnit) |
static javax.money.MonetaryAmount |
ofCents(long centAmount,
String currencyCode) |
static javax.money.MonetaryAmount |
ofCentsAndCurrencyCode(String amount,
String currencyCode)
Creates a
MonetaryAmount from a cent amount as String and a currencyUnit as String. |
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)
public static javax.money.MonetaryAmount of(BigDecimal amount, javax.money.CurrencyUnit currency)
public static javax.money.MonetaryAmount of(int amount, javax.money.CurrencyUnit currencyUnit)
public static javax.money.MonetaryAmount of(BigDecimal amount, String currencyCode)
public static javax.money.CurrencyUnit createCurrencyByCode(String currencyCode)
public static javax.money.MonetaryAmount of(String amount, javax.money.CurrencyUnit currencyUnit)
public static javax.money.MonetaryAmount ofCentsAndCurrencyCode(String amount, String currencyCode)
MonetaryAmount
from a cent amount as String and a currencyUnit as String.amount
- the amount in cents which consists just of numberscurrencyCode
- the currency code as String like "EUR" for EUROpublic static javax.money.MonetaryAmount ofCents(long centAmount, String currencyCode)
public static javax.money.MonetaryAmount ofCents(long centAmount, javax.money.CurrencyUnit currencyUnit)