public abstract class CurrencyNameProvider extends LocaleServiceProvider
Modifier | Constructor and Description |
---|---|
protected |
CurrencyNameProvider()
唯一的构造函数。
|
Modifier and Type | Method and Description |
---|---|
String |
getDisplayName(String currencyCode, Locale locale)
返回适合显示给用户的货币名称。
|
abstract String |
getSymbol(String currencyCode, Locale locale)
获取指定区域设置的给定货币代码的符号。
|
getAvailableLocales, isSupportedLocale
public abstract String getSymbol(String currencyCode, Locale locale)
currencyCode
- ISO 4217货币代码,由“A”(U + 0041)和“Z”(U + 005A)之间的三个大写字母组成,
locale
- 所需的语言环境
NullPointerException
- 如果
currencyCode
或
locale
为空
IllegalArgumentException
- 如果
currencyCode
不是三个大写字母的形式,或
locale
不是从
getAvailableLocales()
返回的语言环境之一。
Currency.getSymbol(java.util.Locale)
public String getDisplayName(String currencyCode, Locale locale)
currencyCode
- ISO 4217货币代码,由“A”(U + 0041)和“Z”(U + 005A)之间的三个大写字母组成,
locale
- 所需的语言环境
IllegalArgumentException
- 如果
currencyCode
不是三个大写字母的形式,或
locale
不是从
getAvailableLocales()
返回的语言环境之一。
NullPointerException
- 如果
currencyCode
或
locale
是
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, 2014, Oracle and/or its affiliates. All rights reserved.