| java.lang.Object java.util.spi.LocaleServiceProvider java.util.spi.CurrencyNameProvider
CurrencyNameProvider | abstract public class CurrencyNameProvider extends LocaleServiceProvider (Code) | | An abstract class for service providers that
provide localized currency symbols and display names for the
java.util.Currency Currency class.
Note that currency symbols are considered names when determining
behaviors described in the
java.util.spi.LocaleServiceProvider LocaleServiceProvider
specification.
since: 1.6 version: @(#)CurrencyNameProvider.java 1.9 07/05/31 |
Method Summary | |
public String | getDisplayName(String currencyCode, Locale locale) Returns a name for the currency that is appropriate for display to the
user. | abstract public String | getSymbol(String currencyCode, Locale locale) Gets the symbol of the given currency code for the specified locale.
For example, for "USD" (US Dollar), the symbol is "$" if the specified
locale is the US, while for other locales it may be "US$". |
CurrencyNameProvider | protected CurrencyNameProvider()(Code) | | Sole constructor. (For invocation by subclass constructors, typically
implicit.)
|
getDisplayName | public String getDisplayName(String currencyCode, Locale locale)(Code) | | Returns a name for the currency that is appropriate for display to the
user. The default implementation returns null.
Parameters: currencyCode - the ISO 4217 currency code, whichconsists of three upper-case letters between 'A' (U+0041) and 'Z' (U+005A) Parameters: locale - the desired locale the name for the currency that is appropriate for display to theuser, or null if the name is not available for the locale exception: IllegalArgumentException - if currencyCode is not in the form of three upper-case letters, or locale isn'tone of the locales returned from java.util.spi.LocaleServiceProvider.getAvailableLocales getAvailableLocales(). exception: NullPointerException - if currencyCode orlocale is null since: 1.7 |
getSymbol | abstract public String getSymbol(String currencyCode, Locale locale)(Code) | | Gets the symbol of the given currency code for the specified locale.
For example, for "USD" (US Dollar), the symbol is "$" if the specified
locale is the US, while for other locales it may be "US$". If no
symbol can be determined, null should be returned.
Parameters: currencyCode - the ISO 4217 currency code, whichconsists of three upper-case letters between 'A' (U+0041) and 'Z' (U+005A) Parameters: locale - the desired locale the symbol of the given currency code for the specified locale, or null ifthe symbol is not available for the locale exception: NullPointerException - if currencyCode or locale is null exception: IllegalArgumentException - if currencyCode is not in the form of three upper-case letters, or locale isn'tone of the locales returned from java.util.spi.LocaleServiceProvider.getAvailableLocales getAvailableLocales(). See Also: java.util.Currency.getSymbol(java.util.Locale) |
Methods inherited from java.util.spi.LocaleServiceProvider | abstract public Locale[] getAvailableLocales()(Code)(Java Doc)
|
|
|