Package | Description |
---|---|
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 and Description |
---|---|
ConversionContext |
ConversionContext.Builder.create()
Creates a new
ConversionContext with the data from this
Builder instance. |
ConversionContext |
ExchangeRate.getConversionContext()
Access the
ConversionContext of ExchangeRate . |
ConversionContext |
CurrencyConversionException.getConversionContext()
Gets the queried timestamp at fault.
|
ConversionContext |
CurrencyConversion.getConversionContext()
Access the target
ConversionContext of this conversion instance. |
static ConversionContext |
ConversionContext.of()
Simple factory method for
ConversionContext . |
static ConversionContext |
ConversionContext.of(RateType rateType)
Creates a
ConversionContext for accessing rates of the given
type, without specifying the rate's provider. |
static ConversionContext |
ConversionContext.of(java.lang.String provider,
RateType rateType)
Simple factory method for
ConversionContext . |
static ConversionContext |
ConversionContext.of(java.lang.String provider,
RateType rateType,
java.lang.Long timestamp)
|
Modifier and Type | Method and Description |
---|---|
static ProviderContext |
ProviderContext.from(ConversionContext conversionContext) |
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(java.lang.String termCurrencyCode,
ConversionContext conversionContext,
java.lang.String... providers)
Access an instance of
CurrencyConversion for the given providers. |
CurrencyConversion |
ExchangeRateProvider.getCurrencyConversion(CurrencyUnit term,
ConversionContext conversionContext)
Access a
CurrencyConversion that can be applied as a
MonetaryOperator to an amount. |
CurrencyConversion |
ExchangeRateProvider.getCurrencyConversion(java.lang.String termCode,
ConversionContext conversionContext)
Access a
CurrencyConversion that can be applied as a
MonetaryOperator to an amount. |
ExchangeRate |
ExchangeRateProvider.getExchangeRate(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext)
Access a
ExchangeRate using the given currencies. |
ExchangeRate |
ExchangeRateProvider.getExchangeRate(java.lang.String baseCode,
java.lang.String termCode,
ConversionContext conversionContext)
Access a
ExchangeRate using the given currencies. |
boolean |
ExchangeRateProvider.isAvailable(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext)
Checks if an
ExchangeRate between two CurrencyUnit is
available from this provider. |
boolean |
ExchangeRateProvider.isAvailable(java.lang.String baseCode,
java.lang.String termCode,
ConversionContext conversionContext)
Checks if an
ExchangeRate between two CurrencyUnit is
available from this provider. |
ExchangeRate.Builder |
ExchangeRate.Builder.setContext(ConversionContext conversionContext)
Sets the provider to be applied.
|
CurrencyConversion |
CurrencyConversion.with(ConversionContext conversionContext)
Get a new
CurrencyConversion using the given
ConversionContext with additional attributes. |
Constructor and Description |
---|
ConversionContext.Builder(ConversionContext context)
Create a new Builder, hereby using the given
ConversionContext 's values as defaults. |
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.
|
ExchangeRate.Builder(ConversionContext context)
Sets the exchange rate type
|
Modifier and Type | Method and Description |
---|---|
CurrencyConversion |
MonetaryConversionsSpi.getConversion(CurrencyUnit termCurrency,
ConversionContext conversionContext,
java.lang.String... providers)
Access an instance of
CurrencyConversion . |