Top Description Fields Constructors Methods
org.javamoney.moneta.spi

public Class JDKCurrencyProvider

extends Object
implements CurrencyProviderSpi
Class Inheritance
All Implemented Interfaces
javax.money.spi.CurrencyProviderSpi
Imports
org.javamoney.moneta.spi.JDKCurrencyAdapter, java.util.*, java.util.logging.Level, .Logger, java.util.regex.Pattern, javax.money.CurrencyQuery, .CurrencyUnit, javax.money.spi.CurrencyProviderSpi

Default implementation of a CurrencyUnit based on the using the JDK's Currency.
Authors
Anatole Tresch, Werner Keil
Version
1.0.0

Field Summary

Modifier and TypeField and Description
private static final Map<String, CurrencyUnit>
CACHED

Internal shared cache of javax.money.CurrencyUnit instances.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Set<CurrencyUnit>

Returns:

the corresponding CurrencyUnit, or null, if no such unit is provided by this provider.
getCurrencies
(CurrencyQuery
the javax.money.CurrencyContext containing the parameters determining the query. not null.
currencyQuery
)

Implements javax.money.spi.CurrencyProviderSpi.getCurrencies.

Return a CurrencyUnit instances matching the given javax.money.CurrencyContext.

private CurrencyUnit
private List<CurrencyUnit>
getCurrencyUnits(int numCode)

public String
getProviderName()

Overrides default javax.money.spi.CurrencyProviderSpi.getProviderName.

The unique name of this currency provider instance.

private static Map<String, CurrencyUnit>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CACHEDback to summary
private static final Map<String, CurrencyUnit> CACHED

Internal shared cache of javax.money.CurrencyUnit instances.

Constructor Detail

JDKCurrencyProviderback to summary
public JDKCurrencyProvider()

Method Detail

getCurrenciesback to summary
public Set<CurrencyUnit> getCurrencies(CurrencyQuery currencyQuery)

Implements javax.money.spi.CurrencyProviderSpi.getCurrencies.

Return a CurrencyUnit instances matching the given javax.money.CurrencyContext.

Parameters
currencyQuery:CurrencyQuery

the javax.money.CurrencyContext containing the parameters determining the query. not null.

Returns:Set<CurrencyUnit>

the corresponding CurrencyUnit, or null, if no such unit is provided by this provider.

getCurrencyUnitback to summary
private CurrencyUnit getCurrencyUnit(Locale locale)
getCurrencyUnitsback to summary
private List<CurrencyUnit> getCurrencyUnits(int numCode)
getProviderNameback to summary
public String getProviderName()

Overrides default javax.money.spi.CurrencyProviderSpi.getProviderName.

Doc from javax.money.spi.CurrencyProviderSpi.getProviderName.

The unique name of this currency provider instance.

Annotations
@Override
loadCurrenciesback to summary
private static Map<String, CurrencyUnit> loadCurrencies()