Top Description Constructors Methods
org.joda.money

public abstract Class CurrencyUnitDataProvider

extends Object
Class Inheritance
Known Direct Subclasses
org.joda.money.DefaultCurrencyUnitDataProvider

Provider for available currencies.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final void
registerCountry(String
the country code, not null
countryCode
,
String
the currency code, not null
currencyCode
)

Registers a country allowing it to be used.

protected abstract void
registerCurrencies()

Registers all the currencies known by this provider.

protected final void
registerCurrency(String
the currency code, not null
currencyCode
,
int
the numeric currency code, -1 if none
numericCurrencyCode
,
int
the number of decimal places that the currency normally has, from 0 to 3, or -1 for a pseudo-currency
decimalPlaces
)

Registers a currency allowing it to be used.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CurrencyUnitDataProviderback to summary
public CurrencyUnitDataProvider()

Method Detail

registerCountryback to summary
protected final void registerCountry(String countryCode, String currencyCode)

Registers a country allowing it to be used.

This method is called by registerCurrencies() to perform the actual creation of a country.

Parameters
countryCode:String

the country code, not null

currencyCode:String

the currency code, not null

registerCurrenciesback to summary
protected abstract void registerCurrencies() throws Exception

Registers all the currencies known by this provider.

Exceptions
Exception:
if an error occurs
registerCurrencyback to summary
protected final void registerCurrency(String currencyCode, int numericCurrencyCode, int decimalPlaces)

Registers a currency allowing it to be used.

This method is called by registerCurrencies() to perform the actual creation of a currency.

Parameters
currencyCode:String

the currency code, not null

numericCurrencyCode:int

the numeric currency code, -1 if none

decimalPlaces:int

the number of decimal places that the currency normally has, from 0 to 3, or -1 for a pseudo-currency