Package | Description |
---|---|
javax.money |
Main package of the Money and Currency API.
|
javax.money.spi |
SPI interfaces of the Money and Currency API, including bootstrap logic.
|
Modifier and Type | Method and Description |
---|---|
static MonetaryAmountFactory<?> |
MonetaryAmounts.getAmountFactory()
Access the default
MonetaryAmountFactory as defined by
MonetaryAmounts.getDefaultAmountType() . |
static <T extends MonetaryAmount> |
MonetaryAmounts.getAmountFactory(java.lang.Class<T> amountType)
Access an
MonetaryAmountFactory for the given MonetaryAmount implementation
type. |
MonetaryAmountFactory<? extends MonetaryAmount> |
MonetaryAmount.getFactory()
Creates a new
MonetaryAmountFactory , returning the same implementation type Hereby
this given amount is used as a template, so reusing the CurrencyUnit , its numeric
value, the algorithmic implementation as well as the current MonetaryContext . |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setAmount(MonetaryAmount amount)
Uses an arbitrary
MonetaryAmount to initialize this factory. |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setContext(MonetaryContext monetaryContext)
Sets the
MonetaryContext to be used. |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setCurrency(CurrencyUnit currency)
Sets the
CurrencyUnit to be used. |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setCurrency(java.lang.String currencyCode)
Sets the
CurrencyUnit to be used. |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setNumber(double number)
Sets the number to be used.
|
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setNumber(long number)
Sets the number to be used.
|
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setNumber(java.lang.Number number)
Sets the number to be used.
|
Modifier and Type | Method and Description |
---|---|
MonetaryAmountFactory<T> |
MonetaryAmountFactoryProviderSpi.createMonetaryAmountFactory()
Access a
MonetaryAmountFactory given the required context. |
<T extends MonetaryAmount> |
MonetaryAmountsSpi.getAmountFactory(java.lang.Class<T> amountType)
Access the
MonetaryAmountFactory for the given amountType . |