public final class MonetaryFunctions extends Object
| Constructor and Description |
|---|
MonetaryFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
fiterByExcludingCurrency(javax.money.CurrencyUnit... currencies)
Create predicate that filters by CurrencyUnit.
|
static java.util.stream.Collector<javax.money.MonetaryAmount,?,Map<javax.money.CurrencyUnit,List<javax.money.MonetaryAmount>>> |
groupByCurrencyUnit()
Collector to group by CurrencyUnit
|
static java.util.stream.Collector<javax.money.MonetaryAmount,GroupMonetarySummaryStatistics,GroupMonetarySummaryStatistics> |
groupBySummarizingMonetary()
of MonetaryAmount group by MonetarySummary
|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
isBetween(javax.money.MonetaryAmount min,
javax.money.MonetaryAmount max)
Creates a filter using the isBetween predicate.
|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
isCurrency(javax.money.CurrencyUnit... currencies)
Create predicate that filters by CurrencyUnit.
|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
isGreaterThan(javax.money.MonetaryAmount amount)
Creates filter using isGreaterThan in MonetaryAmount.
|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
isGreaterThanOrEqualTo(javax.money.MonetaryAmount amount)
Creates filter using isGreaterThanOrEqualTo in MonetaryAmount
|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
isLessThan(javax.money.MonetaryAmount amount)
Creates filter using isLessThan in MonetaryAmount
|
static java.util.function.Predicate<javax.money.MonetaryAmount> |
isLessThanOrEqualTo(javax.money.MonetaryAmount amount)
Creates filter using isLessThanOrEqualTo in MonetaryAmount
|
static java.util.function.BinaryOperator<javax.money.MonetaryAmount> |
max()
Creates a BinaryOperator to calculate the maximum amount.
|
static javax.money.MonetaryAmount |
max(javax.money.MonetaryAmount a,
javax.money.MonetaryAmount b)
Returns the greater of two
MonetaryAmount values. |
static java.util.function.BinaryOperator<javax.money.MonetaryAmount> |
min()
Creates a BinaryOperator to calculate the minimum amount
|
static javax.money.MonetaryAmount |
min(javax.money.MonetaryAmount a,
javax.money.MonetaryAmount b)
Returns the smaller of two
MonetaryAmount values. |
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 java.util.function.BinaryOperator<javax.money.MonetaryAmount> |
sum()
Creates a BinaryOperator to sum.
|
static javax.money.MonetaryAmount |
sum(javax.money.MonetaryAmount a,
javax.money.MonetaryAmount b)
Adds two monetary together
|
static java.util.stream.Collector<javax.money.MonetaryAmount,MonetarySummaryStatistics,MonetarySummaryStatistics> |
summarizingMonetary(javax.money.CurrencyUnit currencyUnit)
of the summary of the MonetaryAmount
|
public MonetaryFunctions()
public static java.util.stream.Collector<javax.money.MonetaryAmount,?,Map<javax.money.CurrencyUnit,List<javax.money.MonetaryAmount>>> groupByCurrencyUnit()
public static java.util.stream.Collector<javax.money.MonetaryAmount,MonetarySummaryStatistics,MonetarySummaryStatistics> summarizingMonetary(javax.money.CurrencyUnit currencyUnit)
currencyUnit - the target CurrencyUnitpublic static java.util.stream.Collector<javax.money.MonetaryAmount,GroupMonetarySummaryStatistics,GroupMonetarySummaryStatistics> groupBySummarizingMonetary()
public static Comparator<javax.money.MonetaryAmount> sortCurrencyUnit()
public static Comparator<javax.money.MonetaryAmount> sortCurrencyUnitDesc()
public static Comparator<javax.money.MonetaryAmount> sortNumber()
public static Comparator<javax.money.MonetaryAmount> sortNumberDesc()
public static java.util.function.Predicate<javax.money.MonetaryAmount> isCurrency(javax.money.CurrencyUnit... currencies)
currencies - the target CurrencyUnitpublic static java.util.function.Predicate<javax.money.MonetaryAmount> fiterByExcludingCurrency(javax.money.CurrencyUnit... currencies)
currencies - the target CurrencyUnit instances to be filtered.public static java.util.function.Predicate<javax.money.MonetaryAmount> isGreaterThan(javax.money.MonetaryAmount amount)
amount - the amount to be compared, not null.public static java.util.function.Predicate<javax.money.MonetaryAmount> isGreaterThanOrEqualTo(javax.money.MonetaryAmount amount)
amount - the amount to be compared, not null.public static java.util.function.Predicate<javax.money.MonetaryAmount> isLessThan(javax.money.MonetaryAmount amount)
amount - the amount to be compared, not null.public static java.util.function.Predicate<javax.money.MonetaryAmount> isLessThanOrEqualTo(javax.money.MonetaryAmount amount)
amount - the amount to be compared, not null.public static java.util.function.Predicate<javax.money.MonetaryAmount> isBetween(javax.money.MonetaryAmount min, javax.money.MonetaryAmount max)
min - min value inclusive, not null.max - max value inclusive, not null.public static javax.money.MonetaryAmount sum(javax.money.MonetaryAmount a, javax.money.MonetaryAmount b)
a - the first operandb - the second operanda and bNullPointerException - if a o b be nulljavax.money.MonetaryException - if a and b have different currencypublic static javax.money.MonetaryAmount min(javax.money.MonetaryAmount a, javax.money.MonetaryAmount b)
MonetaryAmount values. If the arguments
have the same value, the result is that same value.a - an argument.b - another argument.a and b.public static javax.money.MonetaryAmount max(javax.money.MonetaryAmount a, javax.money.MonetaryAmount b)
MonetaryAmount values. If the
arguments have the same value, the result is that same value.a - an argument.b - another argument.a and b.public static java.util.function.BinaryOperator<javax.money.MonetaryAmount> sum()
public static java.util.function.BinaryOperator<javax.money.MonetaryAmount> min()
public static java.util.function.BinaryOperator<javax.money.MonetaryAmount> max()
Copyright © 2012-2014 JavaMoney. All Rights Reserved.