public abstract class CurrencyNameProvider extends LocaleServiceProvider
Currency class. Note that currency symbols are considered names when determining behaviors described in the
LocaleServiceProvider specification.
| Modifier | Constructor and Description |
|---|---|
protected |
CurrencyNameProvider()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName(String
Returns a name for the currency that is appropriate for display to the user.
|
abstract String |
getSymbol(String
Gets the symbol of the given currency code for the specified locale.
|
getAvailableLocales, isSupportedLocaleprotected CurrencyNameProvider()
public abstract StringgetSymbol(String currencyCode, Locale locale)
currencyCode - the ISO 4217 currency code, which consists of three upper-case letters between 'A' (U+0041) and 'Z' (U+005A)
locale - the desired locale
NullPointerException - if
currencyCode or
locale is null
IllegalArgumentException - if
currencyCode is not in the form of three upper-case letters, or
locale isn't one of the locales returned from
getAvailableLocales().
Currency.getSymbol(java.util.Locale)
public StringgetDisplayName(String currencyCode, Locale locale)
currencyCode - the ISO 4217 currency code, which consists of three upper-case letters between 'A' (U+0041) and 'Z' (U+005A)
locale - the desired locale
IllegalArgumentException - if
currencyCode is not in the form of three upper-case letters, or
locale isn't one of the locales returned from
getAvailableLocales().
NullPointerException - if
currencyCode or
locale is
null