public final class MonetaryFunctions extends Object
Constructor and Description |
---|
MonetaryFunctions() |
Modifier and Type | Method and Description |
---|---|
static Comparator<javax.money.MonetaryAmount> |
sortCurrencyUnit()
Get a comparator for sorting CurrencyUnits ascending.
|
static Comparator<javax.money.MonetaryAmount> |
sortCurrencyUnitDesc()
Get a comparator for sorting CurrencyUnits descending.
|
static Comparator<javax.money.MonetaryAmount> |
sortNumber()
Get a comparator for sorting amount by number value ascending.
|
static Comparator<javax.money.MonetaryAmount> |
sortNumberDesc()
Get a comparator for sorting amount by number value descending.
|
static Comparator<? super javax.money.MonetaryAmount> |
sortValuable(javax.money.convert.ExchangeRateProvider provider)
comparator to sort the
MonetaryAmount considering the
ExchangeRate |
static Comparator<? super javax.money.MonetaryAmount> |
sortValuableDesc(javax.money.convert.ExchangeRateProvider provider)
Descending order of
sortValuable(ExchangeRateProvider) |
static javax.money.MonetaryAmount |
sum(javax.money.MonetaryAmount a,
javax.money.MonetaryAmount b)
Adds two monetary together
|
public MonetaryFunctions()
public static Comparator<javax.money.MonetaryAmount> sortCurrencyUnit()
public static Comparator<? super javax.money.MonetaryAmount> sortValuable(javax.money.convert.ExchangeRateProvider provider)
MonetaryAmount
considering the
ExchangeRate
provider
- the rate provider to be used.MonetaryAmount
using ExchangeRate
public static Comparator<? super javax.money.MonetaryAmount> sortValuableDesc(javax.money.convert.ExchangeRateProvider provider)
sortValuable(ExchangeRateProvider)
provider
- the rate provider to be used.sortValuable(ExchangeRateProvider)
public static Comparator<javax.money.MonetaryAmount> sortCurrencyUnitDesc()
public static Comparator<javax.money.MonetaryAmount> sortNumber()
public static Comparator<javax.money.MonetaryAmount> sortNumberDesc()
public static javax.money.MonetaryAmount sum(javax.money.MonetaryAmount a, javax.money.MonetaryAmount b)
a
- the first operandb
- the second operanda
and b
NullPointerException
- if a o b be nulljavax.money.MonetaryException
- if a and b have different currencyCopyright © 2012-2015 JavaMoney. All Rights Reserved.