- java.lang.Object
-
- javax.money.DefaultMonetaryCurrenciesSingletonSpi
-
- All Implemented Interfaces:
MonetaryCurrenciesSingletonSpi
final class DefaultMonetaryCurrenciesSingletonSpi extends java.lang.Object implements MonetaryCurrenciesSingletonSpi
Factory singleton forCurrencyUnitinstances as provided by the different registeredCurrencyProviderSpiinstances. This class is thread safe.- Version:
- 0.8
-
-
Constructor Summary
Constructors Constructor Description DefaultMonetaryCurrenciesSingletonSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<CurrencyUnit>getCurrencies(CurrencyQuery query)Access all currencies matching the given query.java.util.List<java.lang.String>getDefaultProviderChain()This default implementation simply returns all providers defined in arbitrary order.java.util.Set<java.lang.String>getProviderNames()Get the names of the currently loaded providers.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.money.spi.MonetaryCurrenciesSingletonSpi
getCurrencies, getCurrencies, getCurrency, getCurrency, getCurrency, isCurrencyAvailable, isCurrencyAvailable
-
-
-
-
Method Detail
-
getCurrencies
public java.util.Set<CurrencyUnit> getCurrencies(CurrencyQuery query)
Description copied from interface:MonetaryCurrenciesSingletonSpiAccess all currencies matching the given query.- Specified by:
getCurrenciesin interfaceMonetaryCurrenciesSingletonSpi- Parameters:
query- The currency query, not null.- Returns:
- a set of all currencies found, never null.
-
getDefaultProviderChain
public java.util.List<java.lang.String> getDefaultProviderChain()
This default implementation simply returns all providers defined in arbitrary order.- Specified by:
getDefaultProviderChainin interfaceMonetaryCurrenciesSingletonSpi- Returns:
- the default provider chain, never null.
- See Also:
MonetaryCurrenciesSingletonSpi.getCurrencies(String...),CurrencyQueryBuilder
-
getProviderNames
public java.util.Set<java.lang.String> getProviderNames()
Get the names of the currently loaded providers.- Specified by:
getProviderNamesin interfaceMonetaryCurrenciesSingletonSpi- Returns:
- the names of the currently loaded providers, never null.
-
-