Uses of Interface
javax.money.CurrencyUnit
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.
|
-
Uses of CurrencyUnit in javax.money
Methods in javax.money that return CurrencyUnit Modifier and Type Method Description CurrencyUnit
CurrencySupplier. getCurrency()
Gets the correspondingCurrencyUnit
.static CurrencyUnit
Monetary. getCurrency(java.lang.String currencyCode, java.lang.String... providers)
Access a new instance based on the currency code.static CurrencyUnit
Monetary. getCurrency(java.util.Locale locale, java.lang.String... providers)
Access a new instance based on theLocale
.static CurrencyUnit
Monetary. getCurrency(CurrencyQuery query)
Query all currencies matching the given query.CurrencyUnit
RoundingContext. getCurrency()
Get the basicCurrencyUnit
, which is based for this rounding type.CurrencyUnit
RoundingQuery. getCurrency()
Sets the target CurrencyUnit.Methods in javax.money that return types with arguments of type CurrencyUnit Modifier and Type Method Description static java.util.Collection<CurrencyUnit>
Monetary. getCurrencies(java.lang.String... providers)
Access all currencies known.static java.util.Set<CurrencyUnit>
Monetary. getCurrencies(java.util.Locale locale, java.lang.String... providers)
Access a new instance based on theLocale
.static java.util.Collection<CurrencyUnit>
Monetary. getCurrencies(CurrencyQuery query)
Query all currencies matching the given query.Methods in javax.money with parameters of type CurrencyUnit Modifier and Type Method Description static MonetaryRounding
Monetary. getRounding(CurrencyUnit currencyUnit, java.lang.String... providers)
Creates anMonetaryOperator
for roundingMonetaryAmount
instances given a currency.static boolean
Monetary. isRoundingAvailable(CurrencyUnit currencyUnit, java.lang.String... providers)
Checks if aMonetaryRounding
is available given a roundingId.MonetaryAmountFactory<T>
MonetaryAmountFactory. setCurrency(CurrencyUnit currency)
Sets theCurrencyUnit
to be used.RoundingContextBuilder
RoundingContextBuilder. setCurrency(CurrencyUnit currencyUnit)
Get the basicCurrencyUnit
, which is based for this rounding type.RoundingQueryBuilder
RoundingQueryBuilder. setCurrency(CurrencyUnit currencyUnit)
Sets the targetCurrencyUnit
, which defines a rounding targeting a concreteCurrencyUnit
. -
Uses of CurrencyUnit in javax.money.convert
Methods in javax.money.convert that return 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.Methods in javax.money.convert with parameters of type CurrencyUnit Modifier and Type Method Description static CurrencyConversion
MonetaryConversions. getConversion(CurrencyUnit termCurrency, java.lang.String... providers)
Access an instance ofCurrencyConversion
for the given providers.default CurrencyConversion
ExchangeRateProvider. getCurrencyConversion(CurrencyUnit term)
Access aCurrencyConversion
that can be applied as aMonetaryOperator
to an amount.default ExchangeRate
ExchangeRateProvider. getExchangeRate(CurrencyUnit base, CurrencyUnit term)
Access aExchangeRate
using the given currencies.default boolean
ExchangeRateProvider. isAvailable(CurrencyUnit base, CurrencyUnit term)
Checks if anExchangeRate
between twoCurrencyUnit
is available from this provider.static boolean
MonetaryConversions. isConversionAvailable(CurrencyUnit termCurrency, java.lang.String... providers)
Checks if aCurrencyConversion
is available for the given parameters.ConversionQueryBuilder
ConversionQueryBuilder. setBaseCurrency(CurrencyUnit currency)
Sets the base currency.ConversionQueryBuilder
ConversionQueryBuilder. setTermCurrency(CurrencyUnit currency)
Sets the term currency.Constructors in javax.money.convert with parameters of type CurrencyUnit Constructor Description CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext)
Constructs anCurrencyConversionException
with the specified source and target currency.CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext, java.lang.String message)
Constructs anCurrencyConversionException
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. -
Uses of CurrencyUnit in javax.money.spi
Methods in javax.money.spi that return CurrencyUnit Modifier and Type Method Description default CurrencyUnit
MonetaryCurrenciesSingletonSpi. getCurrency(java.lang.String currencyCode, java.lang.String... providers)
Access a new instance based on the currency code.default CurrencyUnit
MonetaryCurrenciesSingletonSpi. getCurrency(java.util.Locale country, java.lang.String... providers)
Access a new instance based on the currency code.default CurrencyUnit
MonetaryCurrenciesSingletonSpi. getCurrency(CurrencyQuery query)
Access a single currency by query.Methods in javax.money.spi that return types with arguments of type CurrencyUnit Modifier and Type Method Description java.util.Set<CurrencyUnit>
CurrencyProviderSpi. getCurrencies(CurrencyQuery query)
Return aCurrencyUnit
instances matching the givenCurrencyContext
.default java.util.Set<CurrencyUnit>
MonetaryCurrenciesSingletonSpi. getCurrencies(java.lang.String... providers)
Provide access to all currently known currencies.default java.util.Set<CurrencyUnit>
MonetaryCurrenciesSingletonSpi. getCurrencies(java.util.Locale locale, java.lang.String... providers)
Provide access to all currently known currencies.java.util.Set<CurrencyUnit>
MonetaryCurrenciesSingletonSpi. getCurrencies(CurrencyQuery query)
Access all currencies matching the given query.Methods in javax.money.spi with parameters of type CurrencyUnit Modifier and Type Method Description default CurrencyConversion
MonetaryConversionsSingletonSpi. getConversion(CurrencyUnit termCurrency, java.lang.String... providers)
Access an instance ofCurrencyConversion
.default MonetaryRounding
MonetaryRoundingsSingletonSpi. getRounding(CurrencyUnit currencyUnit, java.lang.String... providers)
Access aMonetaryRounding
for roundingMonetaryAmount
instances given a currency.default boolean
MonetaryConversionsSingletonSpi. isConversionAvailable(CurrencyUnit termCurrency, java.lang.String... providers)
Allows to quickly check, if aCurrencyConversion
is accessible for the givenConversionQuery
.default boolean
MonetaryRoundingsSingletonSpi. isRoundingAvailable(CurrencyUnit currencyUnit, java.lang.String... providers)
Checks if aMonetaryRounding
is available given aCurrencyUnit
.