public final class MonetaryCurrencies extends Object
CurrencyUnit
instances as provided by the
different registered CurrencyProviderSpi
instances.
This class is thread safe.
Modifier and Type | Method and Description |
---|---|
static Collection<CurrencyUnit> |
getCurrencies(CurrencyQuery query)
Query all currencies matching the given query.
|
static Set<CurrencyUnit> |
getCurrencies(Locale locale,
String... providers)
Access a new instance based on the
Locale . |
static Collection<CurrencyUnit> |
getCurrencies(String... providers)
Access all currencies known.
|
static CurrencyUnit |
getCurrency(CurrencyQuery query)
Query all currencies matching the given query.
|
static CurrencyUnit |
getCurrency(Locale locale,
String... providers)
Access a new instance based on the
Locale . |
static CurrencyUnit |
getCurrency(String currencyCode,
String... providers)
Access a new instance based on the currency code.
|
static List<String> |
getDefaultProviderChain()
Query the list and ordering of provider names modelling the default provider chain to be used, if no provider
chain was explicitly set..
|
static Set<String> |
getProviderNames()
Query all currencies matching the given query.
|
static boolean |
isCurrencyAvailable(Locale locale,
String... providers)
Allows to check if a
CurrencyUnit instance is
defined, i.e. accessible from getCurrency(String, String...) . |
static boolean |
isCurrencyAvailable(String code,
String... providers)
Allows to check if a
CurrencyUnit instance is defined, i.e. |
public static 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.CurrencyUnit
instance.UnknownCurrencyException
- if no such currency exists.public static CurrencyUnit getCurrency(Locale locale, String... providers)
Locale
. Currencies are
available as provided by CurrencyProviderSpi
instances registered
with the Bootstrap
.locale
- the target Locale
, typically representing an ISO
country, not null
.providers
- the (optional) specification of providers to consider.CurrencyUnit
instance.UnknownCurrencyException
- if no such currency exists.public static Set<CurrencyUnit> getCurrencies(Locale locale, String... providers)
Locale
. Currencies are
available as provided by CurrencyProviderSpi
instances registered
with the Bootstrap
.locale
- the target Locale
, typically representing an ISO
country, not null
.providers
- the (optional) specification of providers to consider.CurrencyUnit
instance.UnknownCurrencyException
- if no such currency exists.public static 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.true
if getCurrency(String, java.lang.String...)
would return a result for the given code.public static 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.true
if getCurrencies(Locale, String...)
would return a
result containing a currency with the given code.public static Collection<CurrencyUnit> getCurrencies(String... providers)
providers
- the (optional) specification of providers to consider.public static CurrencyUnit getCurrency(CurrencyQuery query)
query
- The CurrencyQuery
, not null.public static Collection<CurrencyUnit> getCurrencies(CurrencyQuery query)
query
- The CurrencyQuery
, not null.public static Set<String> getProviderNames()
public static List<String> getDefaultProviderChain()
Copyright © 2012–2015 JSR 354 - Expert Group. All rights reserved.