java.lang.Object
org.joda.money.CurrencyUnitDataProvider
Provider for available currencies.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
registerCountry
(String countryCode, String currencyCode) Registers a country allowing it to be used.protected abstract void
Registers all the currencies known by this provider.protected final void
registerCurrency
(String currencyCode, int numericCurrencyCode, int decimalPlaces) Registers a currency allowing it to be used.
-
Constructor Details
-
CurrencyUnitDataProvider
public CurrencyUnitDataProvider()
-
-
Method Details
-
registerCurrencies
Registers all the currencies known by this provider.- Throws:
Exception
- if an error occurs
-
registerCurrency
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
- the currency code, not nullnumericCurrencyCode
- the numeric currency code, -1 if nonedecimalPlaces
- the number of decimal places that the currency normally has, from 0 to 3, or -1 for a pseudo-currency
-
registerCountry
Registers a country allowing it to be used.This method is called by
registerCurrencies()
to perform the actual creation of a country.- Parameters:
countryCode
- the country code, not nullcurrencyCode
- the currency code, not null
-