Top Description Constructors Methods
com.ibm.icu.text

public abstract Class CurrencyDisplayNames

extends Object
Class Inheritance
Known Direct Subclasses
com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfo
Imports
java.util.Locale, .Map, com.ibm.icu.impl.CurrencyData, com.ibm.icu.util.ULocale

Returns currency names localized for a locale. This class is not intended for public subclassing.
ICU Status
Stable since ICU 4.4.

Constructor Summary

AccessConstructor and Description
protected
CurrencyDisplayNames()

Deprecated This API is ICU internal only.
Sole constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract String

Returns:

the formal symbol.
getFormalSymbol
(String
the three-letter ISO code.
isoCode
)

Returns the formal symbol for the currency with the provided ISO code.

public static CurrencyDisplayNames

Returns:

a CurrencyDisplayNames
getInstance
(ULocale
the locale into which to localize the names
locale
)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.

public static CurrencyDisplayNames

Returns:

a CurrencyDisplayNames
getInstance
(Locale
the locale into which to localize the names
locale
)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.

public static CurrencyDisplayNames

Returns:

a CurrencyDisplayNames
getInstance
(ULocale
the locale into which to localize the names
locale
,
boolean
if true, do not return substitute values.
noSubstitute
)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.

public static CurrencyDisplayNames

Returns:

a CurrencyDisplayNames
getInstance
(Locale
the java.util.Locale into which to localize the names
locale
,
boolean
if true, do not return substitute values.
noSubstitute
)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.

public abstract String

Returns:

the display name
getName
(String
the three-letter ISO code
isoCode
)

Returns the 'long name' for the currency with the provided ISO code.

public abstract String

Returns:

the narrow symbol.
getNarrowSymbol
(String
the three-letter ISO code.
isoCode
)

Returns the narrow symbol for the currency with the provided ISO code.

public abstract String

Returns:

the display name
getPluralName
(String
the three-letter ISO code
isoCode
,
String
the plural key, for example "one", "other"
pluralKey
)

Returns a 'plural name' for the currency with the provided ISO code corresponding to the pluralKey.

public abstract String

Returns:

the symbol.
getSymbol
(String
the three-letter ISO code.
isoCode
)

Returns the symbol for the currency with the provided ISO code.

public abstract ULocale

Returns:

the display locale
getULocale
()

Returns the locale used to determine how to translate the currency names.

public abstract String

Returns:

the variant symbol.
getVariantSymbol
(String
the three-letter ISO code.
isoCode
)

Returns the variant symbol for the currency with the provided ISO code.

public static boolean

Returns:

true if currency display name data is available
hasData
()

Deprecated This API is ICU internal only.
Returns true if currency display name data is available.
public abstract Map<String, String>

Returns:

the map
nameMap
()

Returns a mapping from localized names (standard and plural) to currency codes.

public abstract Map<String, String>

Returns:

the map
symbolMap
()

Returns a mapping from localized symbols and currency codes to currency codes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CurrencyDisplayNamesback to summary
protected CurrencyDisplayNames()

Deprecated

This API is ICU internal only.

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Annotations
@Deprecated
ICU Status
Internal ICU component.

Method Detail

getFormalSymbolback to summary
public abstract String getFormalSymbol(String isoCode)

Returns the formal symbol for the currency with the provided ISO code.

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.

Parameters
isoCode:String

the three-letter ISO code.

Returns:String

the formal symbol.

ICU Status
Stable since ICU 67.
getInstanceback to summary
public static CurrencyDisplayNames getInstance(ULocale locale)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale. If there is no data for the provided locale, this falls back to the current default locale; if there is no data for that either, it falls back to the root locale. Substitute values are returned from APIs when there is no data for the requested ISO code.

Parameters
locale:ULocale

the locale into which to localize the names

Returns:CurrencyDisplayNames

a CurrencyDisplayNames

ICU Status
Stable since ICU 4.4.
getInstanceback to summary
public static CurrencyDisplayNames getInstance(Locale locale)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale. If there is no data for the provided locale, this falls back to the current default locale; if there is no data for that either, it falls back to the root locale. Substitute values are returned from APIs when there is no data for the requested ISO code.

Parameters
locale:Locale

the locale into which to localize the names

Returns:CurrencyDisplayNames

a CurrencyDisplayNames

ICU Status
Stable since ICU 54.
getInstanceback to summary
public static CurrencyDisplayNames getInstance(ULocale locale, boolean noSubstitute)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale. If noSubstitute is false, this behaves like 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.

Parameters
locale:ULocale

the locale into which to localize the names

noSubstitute:boolean

if true, do not return substitute values.

Returns:CurrencyDisplayNames

a CurrencyDisplayNames

ICU Status
Stable since ICU 49.
getInstanceback to summary
public static CurrencyDisplayNames getInstance(Locale locale, boolean noSubstitute)

Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale. If noSubstitute is false, this behaves like 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.

Parameters
locale:Locale

the java.util.Locale into which to localize the names

noSubstitute:boolean

if true, do not return substitute values.

Returns:CurrencyDisplayNames

a CurrencyDisplayNames

ICU Status
Stable since ICU 54.
getNameback to summary
public abstract String getName(String isoCode)

Returns the 'long name' for the currency with the provided ISO code. If there is no data for the ISO code, substitutes isoCode, or returns null if noSubstitute was set in the factory method.

Parameters
isoCode:String

the three-letter ISO code

Returns:String

the display name

ICU Status
Stable since ICU 4.4.
getNarrowSymbolback to summary
public abstract String getNarrowSymbol(String isoCode)

Returns the narrow symbol for the currency with the provided ISO code.

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.

Parameters
isoCode:String

the three-letter ISO code.

Returns:String

the narrow symbol.

ICU Status
Stable since ICU 61.
getPluralNameback to summary
public abstract String getPluralName(String isoCode, String pluralKey)

Returns a 'plural name' for the currency with the provided ISO code corresponding to the pluralKey. If there is no data for the ISO code, substitutes isoCode or returns null. If there is data for the ISO code but no data for the plural key, substitutes the 'other' value (and failing that the isoCode) or returns null.

Parameters
isoCode:String

the three-letter ISO code

pluralKey:String

the plural key, for example "one", "other"

Returns:String

the display name

ICU Status
Stable since ICU 4.4.
See Also
com.ibm.icu.text.PluralRules
getSymbolback to summary
public abstract String getSymbol(String isoCode)

Returns the symbol for the currency with the provided ISO code.

If there is no data for this symbol, substitutes isoCode, or returns null if noSubstitute was set in the factory method.

Parameters
isoCode:String

the three-letter ISO code.

Returns:String

the symbol.

ICU Status
Stable since ICU 4.4.
getULocaleback to summary
public abstract ULocale getULocale()

Returns the locale used to determine how to translate the currency names. This is not necessarily the same locale passed to getInstance(ULocale).

Returns:ULocale

the display locale

ICU Status
Stable since ICU 49.
getVariantSymbolback to summary
public abstract String getVariantSymbol(String isoCode)

Returns the variant symbol for the currency with the provided ISO code.

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.

Parameters
isoCode:String

the three-letter ISO code.

Returns:String

the variant symbol.

ICU Status
Stable since ICU 67.
hasDataback to summary
public static boolean hasData()

Deprecated

This API is ICU internal only.

Returns true if currency display name data is available.

Returns:boolean

true if currency display name data is available

Annotations
@Deprecated
ICU Status
Internal ICU component.
nameMapback to summary
public abstract Map<String, String> nameMap()

Returns a mapping from localized names (standard and plural) to currency codes. The returned map is unmodifiable.

Returns:Map<String, String>

the map

ICU Status
Stable since ICU 4.4.
symbolMapback to summary
public abstract Map<String, String> symbolMap()

Returns a mapping from localized symbols and currency codes to currency codes. The returned map is unmodifiable.

Returns:Map<String, String>

the map

ICU Status
Stable since ICU 4.4.