Top Description Fields Constructors Methods
org.javamoney.moneta.spi

public final Class RoundedMoneyProducer

extends Object
implements MonetaryAmountProducer
Class Inheritance
All Implemented Interfaces
org.javamoney.moneta.spi.MonetaryAmountProducer
Imports
java.util.Objects, javax.money.CurrencyUnit, .MonetaryAmount, .MonetaryOperator, org.javamoney.moneta.RoundedMoney, org.javamoney.moneta.function.MonetaryOperators

The implementation of MonetaryAmountProducer that creates MonetaryAmount using RoundedMoney using the MonetaryOperator as rounding operator
Author
Otavio Santana
See Also
RoundedMoneyProducer#RoundedMoneyProducer(MonetaryOperator)

Field Summary

Modifier and TypeField and Description
private final MonetaryOperator

Constructor Summary

AccessConstructor and Description
public
RoundedMoneyProducer(MonetaryOperator
the rounding, not null.
operator
)

Creates this producer using this operator as rounding operator in all MonetaryAmount produced.

public
RoundedMoneyProducer()

Returns the MonetaryAmountProducer that creates MonetaryAmount using the RoundedMoney implementation using MonetaryOperators#rounding() as rounding operator

Method Summary

Modifier and TypeMethod and Description
public MonetaryAmount
public MonetaryOperator
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

operatorback to summary
private final MonetaryOperator operator

Constructor Detail

RoundedMoneyProducerback to summary
public RoundedMoneyProducer(MonetaryOperator operator)

Creates this producer using this operator as rounding operator in all MonetaryAmount produced.

Parameters
operator:MonetaryOperator

the rounding, not null.

Exceptions
NullPointerException:
if operator is null
RoundedMoneyProducerback to summary
public RoundedMoneyProducer()

Returns the MonetaryAmountProducer that creates MonetaryAmount using the RoundedMoney implementation using MonetaryOperators#rounding() as rounding operator

See Also
RoundedMoneyProducer

Method Detail

createback to summary
public MonetaryAmount create(CurrencyUnit currency, Number number)

Implements org.javamoney.moneta.spi.MonetaryAmountProducer.create.

Doc from org.javamoney.moneta.spi.MonetaryAmountProducer.create.

Creates a MonetaryAmount from CurrencyUnit and Number

Annotations
@Override
getOperatorback to summary
public MonetaryOperator getOperator()