| Package | Description |
|---|---|
| javax.money |
Main package of the Money and Currency API.
|
| javax.money.convert |
Defines the monetary currency conversion API.
|
| javax.money.spi |
SPI interfaces of the Money and Currency API, including bootstrap logic.
|
| Modifier and Type | Method | Description |
|---|---|---|
CurrencyUnit |
CurrencySupplier.getCurrency() |
Gets the corresponding
CurrencyUnit. |
static CurrencyUnit |
Monetary.getCurrency(String currencyCode,
String... providers) |
Access a new instance based on the currency code.
|
static CurrencyUnit |
Monetary.getCurrency(Locale locale,
String... providers) |
Access a new instance based on the
Locale. |
static CurrencyUnit |
Monetary.getCurrency(CurrencyQuery query) |
Query all currencies matching the given query.
|
CurrencyUnit |
RoundingContext.getCurrency() |
Get the basic
CurrencyUnit, which is based for this rounding type. |
CurrencyUnit |
RoundingQuery.getCurrency() |
Sets the target CurrencyUnit.
|
| Modifier and Type | Method | Description |
|---|---|---|
static Collection<CurrencyUnit> |
Monetary.getCurrencies(String... providers) |
Access all currencies known.
|
static Set<CurrencyUnit> |
Monetary.getCurrencies(Locale locale,
String... providers) |
Access a new instance based on the
Locale. |
static Collection<CurrencyUnit> |
Monetary.getCurrencies(CurrencyQuery query) |
Query all currencies matching the given query.
|
| Modifier and Type | Method | Description |
|---|---|---|
static MonetaryRounding |
Monetary.getRounding(CurrencyUnit currencyUnit,
String... providers) |
Creates an
MonetaryOperator for rounding MonetaryAmount
instances given a currency. |
static boolean |
Monetary.isRoundingAvailable(CurrencyUnit currencyUnit,
String... providers) |
Checks if a
MonetaryRounding is available given a roundingId. |
MonetaryAmountFactory<T> |
MonetaryAmountFactory.setCurrency(CurrencyUnit currency) |
Sets the
CurrencyUnit to be used. |
RoundingContextBuilder |
RoundingContextBuilder.setCurrency(CurrencyUnit currencyUnit) |
Get the basic
CurrencyUnit, which is based for this rounding type. |
RoundingQueryBuilder |
RoundingQueryBuilder.setCurrency(CurrencyUnit currencyUnit) |
Sets the target
CurrencyUnit, which defines a rounding targeting a concrete CurrencyUnit. |
| Modifier and Type | Method | Description |
|---|---|---|
CurrencyUnit |
ConversionQuery.getBaseCurrency() |
Get the base currency.
|
CurrencyUnit |
CurrencyConversionException.getBaseCurrency() |
Gets the first currency at fault.
|
CurrencyUnit |
ExchangeRate.getBaseCurrency() |
Get the base (source)
CurrencyUnit. |
CurrencyUnit |
ConversionQuery.getCurrency() |
Get the terminating currency.
|
CurrencyUnit |
ExchangeRate.getCurrency() |
Get the term (target)
CurrencyUnit. |
CurrencyUnit |
CurrencyConversionException.getTermCurrency() |
Gets the second currency at fault.
|
| Modifier and Type | Method | Description |
|---|---|---|
static CurrencyConversion |
MonetaryConversions.getConversion(CurrencyUnit termCurrency,
String... providers) |
Access an instance of
CurrencyConversion for the given providers. |
default CurrencyConversion |
ExchangeRateProvider.getCurrencyConversion(CurrencyUnit term) |
Access a
CurrencyConversion that can be applied as a
MonetaryOperator to an amount. |
default ExchangeRate |
ExchangeRateProvider.getExchangeRate(CurrencyUnit base,
CurrencyUnit term) |
Access a
ExchangeRate using the given currencies. |
default boolean |
ExchangeRateProvider.isAvailable(CurrencyUnit base,
CurrencyUnit term) |
Checks if an
ExchangeRate between two CurrencyUnit is
available from this provider. |
static boolean |
MonetaryConversions.isConversionAvailable(CurrencyUnit termCurrency,
String... providers) |
Checks if a
CurrencyConversion is available for the given parameters. |
ConversionQueryBuilder |
ConversionQueryBuilder.setBaseCurrency(CurrencyUnit currency) |
Sets the base currency.
|
ConversionQueryBuilder |
ConversionQueryBuilder.setTermCurrency(CurrencyUnit currency) |
Sets the term currency.
|
| Constructor | 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,
String message) |
Constructs an
CurrencyConversionException with the specified
detail message, timestamp, source and target currency. |
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext,
String message,
Throwable cause) |
Constructs a new exception with the specified source and target currency,
detail message and cause.
|
| Modifier and Type | Method | Description |
|---|---|---|
default CurrencyUnit |
MonetaryCurrenciesSingletonSpi.getCurrency(String currencyCode,
String... providers) |
Access a new instance based on the currency code.
|
default CurrencyUnit |
MonetaryCurrenciesSingletonSpi.getCurrency(Locale country,
String... providers) |
Access a new instance based on the currency code.
|
default CurrencyUnit |
MonetaryCurrenciesSingletonSpi.getCurrency(CurrencyQuery query) |
Access a single currency by query.
|
| Modifier and Type | Method | Description |
|---|---|---|
Set<CurrencyUnit> |
CurrencyProviderSpi.getCurrencies(CurrencyQuery query) |
Return a
CurrencyUnit instances matching the given
CurrencyContext. |
default Set<CurrencyUnit> |
MonetaryCurrenciesSingletonSpi.getCurrencies(String... providers) |
Provide access to all currently known currencies.
|
default Set<CurrencyUnit> |
MonetaryCurrenciesSingletonSpi.getCurrencies(Locale locale,
String... providers) |
Provide access to all currently known currencies.
|
Set<CurrencyUnit> |
MonetaryCurrenciesSingletonSpi.getCurrencies(CurrencyQuery query) |
Access all currencies matching the given query.
|
| Modifier and Type | Method | Description |
|---|---|---|
default CurrencyConversion |
MonetaryConversionsSingletonSpi.getConversion(CurrencyUnit termCurrency,
String... providers) |
Access an instance of
CurrencyConversion. |
default MonetaryRounding |
MonetaryRoundingsSingletonSpi.getRounding(CurrencyUnit currencyUnit,
String... providers) |
Access a
MonetaryRounding for rounding MonetaryAmount
instances given a currency. |
default boolean |
MonetaryConversionsSingletonSpi.isConversionAvailable(CurrencyUnit termCurrency,
String... providers) |
Allows to quickly check, if a
CurrencyConversion is accessible for the given
ConversionQuery. |
default boolean |
MonetaryRoundingsSingletonSpi.isRoundingAvailable(CurrencyUnit currencyUnit,
String... providers) |
Checks if a
MonetaryRounding is available given a CurrencyUnit. |
Copyright © 2012–2018 JSR 354 - Expert Group. All rights reserved.