| Constructor and Description |
|---|
Amounts() |
| Modifier and Type | Method and Description |
|---|---|
static Amount |
abs(Amount amount)
Amount absolute value.
|
static Amount |
add(Amount first,
Amount second)
Sums two amounts with the same
CurrencyCode and throws IllegalArgumentException if
amounts don’t have the same CurrencyCode |
static Amount |
copy(Amount amount)
Creates a copy of given
Amount object. |
static Amount |
divide(Amount amount,
java.math.BigDecimal devisor) |
static Amount |
multiply(Amount amount,
java.math.BigDecimal times)
Multiplies given
Amount specified number of times. |
static Amount |
negate(Amount amount)
Negate Amount
|
static Amount |
setPrecision(Amount amount,
int precision,
java.math.RoundingMode roundingMode)
Sets the precision for amount.
|
static Amount |
zero(com.neovisionaries.i18n.CurrencyCode currencyCode)
Creates
Amount object with 0 (zero) value and given CurrencyCode |
public Amounts()
public static Amount add(Amount first, Amount second)
Sums two amounts with the same CurrencyCode and throws IllegalArgumentException if
amounts don’t have the same CurrencyCode
first - second - public static Amount copy(Amount amount)
Creates a copy of given Amount object.
amount - public static Amount multiply(Amount amount, java.math.BigDecimal times)
Multiplies given Amount specified number of times.
amount - times - public static Amount negate(Amount amount)
Negate Amount
amount - the amountpublic static Amount setPrecision(Amount amount, int precision, java.math.RoundingMode roundingMode)
Sets the precision for amount.
amount - the amountprecision - the precisionroundingMode - the rounding modeCopyright © 2014-2018 Konik.io. All Rights Reserved.