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 currencyCode,
Locale locale)
Returns a name for the currency that is appropriate for display to the
user.
|
abstract String |
getSymbol(String currencyCode,
Locale locale)
Gets the symbol of the given currency code for the specified locale.
|
getAvailableLocales
protected CurrencyNameProvider()
public abstract String getSymbol(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 localeNullPointerException
- if currencyCode
or
locale
is nullIllegalArgumentException
- 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 String getDisplayName(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 localeIllegalArgumentException
- 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
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2012, Oracle and/or its affiliates. All rights reserved.