public interface MonetaryCurrenciesSingletonSpi
MonetaryCurrencies that provides access to
different registered CurrencyProviderSpi instances.
Implementations of this interface must be thread safe.
| Modifier and Type | Method and Description |
|---|---|
Set<CurrencyUnit> |
getCurrencies(CurrencyQuery query)
Access all currencies matching the given query.
|
default Set<CurrencyUnit> |
getCurrencies(Locale locale,
String... providers)
Provide access to all currently known currencies.
|
default Set<CurrencyUnit> |
getCurrencies(String... providers)
Provide access to all currently known currencies.
|
default CurrencyUnit |
getCurrency(CurrencyQuery query)
Access a single currency by query.
|
default CurrencyUnit |
getCurrency(Locale country,
String... providers)
Access a new instance based on the currency code.
|
default CurrencyUnit |
getCurrency(String currencyCode,
String... providers)
Access a new instance based on the currency code.
|
List<String> |
getDefaultProviderChain()
Access a list of the currently registered default providers.
|
Set<String> |
getProviderNames()
Access a list of the currently registered providers.
|
default boolean |
isCurrencyAvailable(Locale locale,
String... providers)
Allows to check if a
CurrencyUnit instance is
defined, i.e. accessible from getCurrency(String, String...). |
default boolean |
isCurrencyAvailable(String code,
String... providers)
Allows to check if a
CurrencyUnit instance is defined, i.e. |
List<String> getDefaultProviderChain()
javamoney.properties is used.getCurrencies(String...),
CurrencyQueryBuilderSet<String> getProviderNames()
getCurrencies(String...).javamoney.properties is used.Set<CurrencyUnit> getCurrencies(CurrencyQuery query)
query - The currency query, not null.default CurrencyUnit getCurrency(String currencyCode, String... providers)
CurrencyProviderSpi instances registered
with the Bootstrap.currencyCode - the ISO currency code, not null.providers - the (optional) specification of providers to consider. If not set (empty) the providers
as defined by #getDefaultProviderChain() should be used.CurrencyUnit instance.UnknownCurrencyException - if no such currency exists.default CurrencyUnit getCurrency(Locale country, String... providers)
CurrencyProviderSpi instances registered
with the Bootstrap.country - the ISO currency's country, not null.providers - the (optional) specification of providers to consider. If not set (empty) the providers
as defined by #getDefaultProviderChain() should be used.CurrencyUnit instance.UnknownCurrencyException - if no such currency exists.default Set<CurrencyUnit> getCurrencies(Locale locale, String... providers)
locale - the target Locale, typically representing an ISO country,
not null.providers - the (optional) specification of providers to consider. If not set (empty) the providers
as defined by #getDefaultProviderChain() should be used.default boolean isCurrencyAvailable(String code, String... providers)
CurrencyUnit instance is defined, i.e.
accessible from getCurrency(String, String...).code - the currency code, not null.providers - the (optional) specification of providers to consider. If not set (empty) the providers
as defined by #getDefaultProviderChain() should be used.true if getCurrency(String, String...)
would return a result for the given code.default boolean isCurrencyAvailable(Locale locale, String... providers)
CurrencyUnit instance is
defined, i.e. accessible from getCurrency(String, String...).locale - the target Locale, not null.providers - the (optional) specification of providers to consider. If not set (empty) the providers
as defined by #getDefaultProviderChain() should be used.true if getCurrencies(java.util.Locale, String...) would return a
non empty result for the given code.default Set<CurrencyUnit> getCurrencies(String... providers)
providers - the (optional) specification of providers to consider. If not set (empty) the providers
as defined by #getDefaultProviderChain() should be used.default CurrencyUnit getCurrency(CurrencyQuery query)
query - The currency query, not null.CurrencyUnit found, never null.MonetaryException - if multiple currencies match the query.Copyright © 2012–2015 JSR 354 - Expert Group. All rights reserved.