Package java.util.spi
Class CurrencyNameProvider
java.lang.Object
java.util.spi.LocaleServiceProvider
java.util.spi.CurrencyNameProvider
public abstract class CurrencyNameProvider extends LocaleServiceProvider
This abstract class should be extended by service providers that provide
localized currency symbols (currency names) from currency codes.
Note that Android does not support user-supplied locale service providers.
- Since:
- 1.6
-
Constructor Summary
Constructors Modifier Constructor Description protectedCurrencyNameProvider()Default constructor, for use by subclasses. -
Method Summary
Methods inherited from class java.util.spi.LocaleServiceProvider
getAvailableLocales
-
Constructor Details
-
CurrencyNameProvider
protected CurrencyNameProvider()Default constructor, for use by subclasses.
-
-
Method Details
-
getSymbol
Returns the localized currency symbol for the given currency code.- Parameters:
code- an ISO 4217 currency codelocale- a locale- Returns:
- the symbol or null if there is no available symbol in the locale
- Throws:
NullPointerException- ifcode == null || locale == nullIllegalArgumentException- if code or locale is not in a legal format or not available
-