public abstract class CurrencyDisplayNames extends Object
Modifier | Constructor and Description |
---|---|
protected |
CurrencyDisplayNames()
Deprecated.
This API is ICU internal only.
|
Modifier and Type | Method and Description |
---|---|
abstract String |
getFormalSymbol(String isoCode)
Returns the formal symbol for the currency with the provided ISO code.
|
static CurrencyDisplayNames |
getInstance(Locale locale)
Return an instance of CurrencyDisplayNames that provides information
localized for display in the provided locale.
|
static CurrencyDisplayNames |
getInstance(Locale locale,
boolean noSubstitute)
Return an instance of CurrencyDisplayNames that provides information
localized for display in the provided locale.
|
static CurrencyDisplayNames |
getInstance(ULocale locale)
Return an instance of CurrencyDisplayNames that provides information
localized for display in the provided locale.
|
static CurrencyDisplayNames |
getInstance(ULocale locale,
boolean noSubstitute)
Return an instance of CurrencyDisplayNames that provides information
localized for display in the provided locale.
|
abstract String |
getName(String isoCode)
Returns the 'long name' for the currency with the provided ISO code.
|
abstract String |
getNarrowSymbol(String isoCode)
Returns the narrow symbol for the currency with the provided ISO code.
|
abstract String |
getPluralName(String isoCode,
String pluralKey)
Returns a 'plural name' for the currency with the provided ISO code corresponding to
the pluralKey.
|
abstract String |
getSymbol(String isoCode)
Returns the symbol for the currency with the provided ISO code.
|
abstract ULocale |
getULocale()
Returns the locale used to determine how to translate the currency names.
|
abstract String |
getVariantSymbol(String isoCode)
Returns the variant symbol for the currency with the provided ISO code.
|
static boolean |
hasData()
Deprecated.
This API is ICU internal only.
|
abstract Map<String,String> |
nameMap()
Returns a mapping from localized names (standard and plural) to currency codes.
|
abstract Map<String,String> |
symbolMap()
Returns a mapping from localized symbols and currency codes to currency codes.
|
@Deprecated protected CurrencyDisplayNames()
public static CurrencyDisplayNames getInstance(ULocale locale)
locale
- the locale into which to localize the namespublic static CurrencyDisplayNames getInstance(Locale locale)
locale
- the locale into which to localize the namespublic static CurrencyDisplayNames getInstance(ULocale locale, boolean noSubstitute)
getInstance(ULocale)
. Otherwise, 1) if there
is no supporting data for the locale at all, there is no fallback through
the default locale or root, and null is returned, and 2) if there is data
for the locale, but not data for the requested ISO code, null is returned
from those APIs instead of a substitute value.locale
- the locale into which to localize the namesnoSubstitute
- if true, do not return substitute values.public static CurrencyDisplayNames getInstance(Locale locale, boolean noSubstitute)
getInstance(Locale)
. Otherwise, 1) if there
is no supporting data for the locale at all, there is no fallback through
the default locale or root, and null is returned, and 2) if there is data
for the locale, but not data for the requested ISO code, null is returned
from those APIs instead of a substitute value.locale
- the Locale
into which to localize the namesnoSubstitute
- if true, do not return substitute values.@Deprecated public static boolean hasData()
public abstract ULocale getULocale()
getInstance(ULocale)
.public abstract String getSymbol(String isoCode)
If there is no data for this symbol, substitutes isoCode, or returns null if noSubstitute was set in the factory method.
isoCode
- the three-letter ISO code.public abstract String getNarrowSymbol(String isoCode)
The narrow currency symbol is similar to the regular currency symbol, but it always takes the shortest form; for example, "$" instead of "US$" for USD in en-CA.
If there is no data for this symbol, substitutes the default symbol, or returns null if noSubstitute was set in the factory method.
isoCode
- the three-letter ISO code.public abstract String getFormalSymbol(String isoCode)
The formal currency symbol is similar to the regular currency symbol, but it always takes the form used in formal settings such as banking; for example, "NT$" instead of "$" for TWD in zh-TW.
If there is no data for this symbol, substitutes the default symbol, or returns null if noSubstitute was set in the factory method.
isoCode
- the three-letter ISO code.public abstract String getVariantSymbol(String isoCode)
The variant symbol for a currency is an alternative symbol that is not necessarily as widely used as the regular symbol.
If there is no data for variant symbol, substitutes the default symbol, or returns null if noSubstitute was set in the factory method.
isoCode
- the three-letter ISO code.public abstract String getName(String isoCode)
isoCode
- the three-letter ISO codepublic abstract String getPluralName(String isoCode, String pluralKey)
isoCode
- the three-letter ISO codepluralKey
- the plural key, for example "one", "other"PluralRules
public abstract Map<String,String> symbolMap()
Copyright © 2016 Unicode, Inc. and others.