Top Description Methods
org.javamoney.moneta.function

public Interface MonetaryAmountProducer

Known Direct Implementers
org.javamoney.moneta.function.MoneyProducer, org.javamoney.moneta.function.RoundedMoneyProducer, org.javamoney.moneta.function.FastMoneyProducer
Annotations
@FunctionalInterface
Imports
javax.money.CurrencyUnit, .MonetaryAmount

The producer of MonetaryAmount from CurrencyUnit and Number
Author
Otavio Santana
Since
1.0.1
See Also
FastMoneyProducer, MoneyProducer, RoundedMoneyProducer

Method Summary

Modifier and TypeMethod and Description
public MonetaryAmount

Returns:

a MonetaryAmount never null
create
(CurrencyUnit
the currency unit, not null.
currency
,
Number
the amount, not null.
number
)

Creates a MonetaryAmount from CurrencyUnit and Number

Method Detail

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

Creates a MonetaryAmount from CurrencyUnit and Number

Parameters
currency:CurrencyUnit

the currency unit, not null.

number:Number

the amount, not null.

Returns:MonetaryAmount

a MonetaryAmount never null

Exceptions
NullPointerException:
if currency and Number is null