public final class RoundedMoneyProducer extends Object implements MonetaryAmountProducer
MonetaryAmountProducer that creates MonetaryAmount
using RoundedMoney using the MonetaryOperator as rounding operatorRoundedMoneyProducer(MonetaryOperator)| Constructor and Description |
|---|
RoundedMoneyProducer()
Returns the
MonetaryAmountProducer that creates MonetaryAmount
using the RoundedMoney implementation using MonetaryOperators.rounding()
as rounding operator |
RoundedMoneyProducer(MonetaryOperator operator)
Creates this producer using this operator
as rounding operator in all MonetaryAmount produced.
|
| Modifier and Type | Method and Description |
|---|---|
MonetaryAmount |
create(CurrencyUnit currency,
Number number)
|
MonetaryOperator |
getOperator() |
public RoundedMoneyProducer(MonetaryOperator operator)
operator - the rounding, not nullNullPointerException - if operator is nullpublic RoundedMoneyProducer()
MonetaryAmountProducer that creates MonetaryAmount
using the RoundedMoney implementation using MonetaryOperators.rounding()
as rounding operatorRoundedMoneyProducerpublic MonetaryAmount create(CurrencyUnit currency, Number number)
MonetaryAmountProducercreate in interface MonetaryAmountProducercurrency - the currency, not null.number - the amount, not null.MonetaryAmount never nullpublic MonetaryOperator getOperator()
Copyright © 2012–2020 JavaMoney. All rights reserved.