Package | Description |
---|---|
javax.money |
Main package of the Money and Currency API.
|
javax.money.convert |
Defines the monetary currency conversion API.
|
javax.money.format |
Money and Currency format API.
|
javax.money.spi |
SPI interfaces of the Money and Currency API, including bootstrap logic.
|
Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
CurrencySupplier.getCurrency()
Gets a result.
|
CurrencyUnit |
MonetaryAmount.getCurrency()
Returns the amount’s currency, modeled as
CurrencyUnit . |
static CurrencyUnit |
MonetaryCurrencies.getCurrency(java.util.Locale locale)
Access a new instance based on the
Locale . |
static CurrencyUnit |
MonetaryCurrencies.getCurrency(java.lang.String currencyCode)
Access a new instance based on the currency code.
|
Modifier and Type | Method and Description |
---|---|
static MonetaryOperator |
MonetaryRoundings.getCashRounding(CurrencyUnit currency)
Creates an
MonetaryOperator for rounding MonetaryAmount
instances given a currency. |
static MonetaryOperator |
MonetaryRoundings.getCashRounding(CurrencyUnit currency,
long timestamp)
Creates an
MonetaryOperator for rounding MonetaryAmount
instances given a currency, hereby the rounding must be valid for the
given timestamp. |
static MonetaryOperator |
MonetaryRoundings.getRounding(CurrencyUnit currency)
Creates an
MonetaryOperator for rounding MonetaryAmount
instances given a currency. |
static MonetaryOperator |
MonetaryRoundings.getRounding(CurrencyUnit currency,
long timestamp)
Creates an
MonetaryOperator for rounding MonetaryAmount
instances given a currency, hereby the rounding must be valid for the
given timestamp. |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setCurrency(CurrencyUnit currency)
Sets the
CurrencyUnit to be used. |
Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
ExchangeRate.getBase()
Get the base (source)
CurrencyUnit . |
CurrencyUnit |
CurrencyConversionException.getBase()
Gets the first currency at fault.
|
CurrencyUnit |
ExchangeRate.getTerm()
Get the term (target)
CurrencyUnit . |
CurrencyUnit |
CurrencyConversionException.getTerm()
Gets the second currency at fault.
|
CurrencyUnit |
CurrencyConversion.getTermCurrency()
Access the terminating
CurrencyUnit of this conversion instance. |
Modifier and Type | Method and Description |
---|---|
static CurrencyConversion |
MonetaryConversions.getConversion(CurrencyUnit termCurrency,
ConversionContext conversionContext,
java.lang.String... providers)
Access an instance of
CurrencyConversion for the given providers. |
static CurrencyConversion |
MonetaryConversions.getConversion(CurrencyUnit termCurrency,
java.lang.String... providers)
Access an instance of
CurrencyConversion for the given providers. |
CurrencyConversion |
ExchangeRateProvider.getCurrencyConversion(CurrencyUnit term)
Access a
CurrencyConversion that can be applied as a
MonetaryOperator to an amount. |
CurrencyConversion |
ExchangeRateProvider.getCurrencyConversion(CurrencyUnit term,
ConversionContext conversionContext)
Access a
CurrencyConversion that can be applied as a
MonetaryOperator to an amount. |
ExchangeRate |
ExchangeRateProvider.getExchangeRate(CurrencyUnit base,
CurrencyUnit term)
Access a
ExchangeRate using the given currencies. |
ExchangeRate |
ExchangeRateProvider.getExchangeRate(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext)
Access a
ExchangeRate using the given currencies. |
boolean |
ExchangeRateProvider.isAvailable(CurrencyUnit base,
CurrencyUnit term)
Checks if an
ExchangeRate between two CurrencyUnit is
available from this provider. |
boolean |
ExchangeRateProvider.isAvailable(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext)
Checks if an
ExchangeRate between two CurrencyUnit is
available from this provider. |
ExchangeRate.Builder |
ExchangeRate.Builder.setBase(CurrencyUnit base)
Sets the base
CurrencyUnit |
ExchangeRate.Builder |
ExchangeRate.Builder.setTerm(CurrencyUnit term)
Sets the terminating (target)
CurrencyUnit |
Constructor and Description |
---|
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext)
Constructs an
CurrencyConversionException with the specified
source and target currency. |
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext,
java.lang.String message)
Constructs an
CurrencyConversionException with the specified
detail message, timestamp, source and target currency. |
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext,
java.lang.String message,
java.lang.Throwable cause)
Constructs a new exception with the specified source and target currency,
detail message and cause.
|
Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
MonetaryAmountFormat.getDefaultCurrency()
The
CurrencyUnit to be applied when a MonetaryAmount is parsed and no
CurrencyUnit is provided within the pattern. |
Modifier and Type | Method and Description |
---|---|
void |
MonetaryAmountFormat.setDefaultCurrency(CurrencyUnit currency)
Set the
CurrencyUnit to be used. |
Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
CurrencyProviderSpi.getCurrencyUnit(java.util.Locale locale)
Return a (current)
CurrencyUnit matching the given (country)
Locale . |
CurrencyUnit |
CurrencyProviderSpi.getCurrencyUnit(java.lang.String currencyCode)
Return a (current)
CurrencyUnit matching the given currency code. |
Modifier and Type | Method and Description |
---|---|
MonetaryOperator |
RoundingProviderSpi.getCashRounding(CurrencyUnit currency)
Access the current valid rounding for the given
CurrencyUnit . |
MonetaryOperator |
RoundingProviderSpi.getCashRounding(CurrencyUnit currency,
long timestamp)
Access the cash rounding for the given
CurrencyUnit , that was
valid at the given timestamp. |
CurrencyConversion |
MonetaryConversionsSpi.getConversion(CurrencyUnit termCurrency,
ConversionContext conversionContext,
java.lang.String... providers)
Access an instance of
CurrencyConversion . |
MonetaryOperator |
RoundingProviderSpi.getRounding(CurrencyUnit currency)
Access the current valid rounding for the given
CurrencyUnit . |
MonetaryOperator |
RoundingProviderSpi.getRounding(CurrencyUnit currency,
long timestamp)
Access the rounding for the given
CurrencyUnit , that was valid at
the given timestamp. |