Top Description Methods
org.javamoney.moneta.spi

public Interface MonetaryAmountProducer

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

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

Method Summary

Modifier and TypeMethod and Description
public MonetaryAmount

Returns:

a MonetaryAmount never null
create
(CurrencyUnit
the currency, 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, not null

number:Number

the amount, not null.

Returns:MonetaryAmount

a MonetaryAmount never null

Exceptions
NullPointerException:
if currency and Number is null