com.ibm.icu.text
Class CurrencyDisplayNames

java.lang.Object
  extended by com.ibm.icu.text.CurrencyDisplayNames

public abstract class CurrencyDisplayNames
extends Object

Returns currency names localized for a locale. This class is not intended for public subclassing.

Status:
Draft ICU 4.4.

Constructor Summary
protected CurrencyDisplayNames()
          Deprecated. This API is ICU internal only.
 
Method Summary
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 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.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrencyDisplayNames

protected CurrencyDisplayNames()
Deprecated. This API is ICU internal only.

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

Status:
Internal. This API is ICU internal only.
Method Detail

getInstance

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 - the locale into which to localize the names
Returns:
a CurrencyDisplayNames
Status:
Draft ICU 4.4.

getInstance

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 - the locale into which to localize the names
noSubstitute - if true, do not return substitute values.
Returns:
a CurrencyDisplayNames
Status:
Draft ICU 49.

hasData

public static boolean hasData()
Deprecated. This API is ICU internal only.

Returns true if currency display name data is available.

Returns:
true if currency display name data is available
Status:
Internal. This API is ICU internal only.

getULocale

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:
the display locale
Status:
Draft ICU 49.

getSymbol

public abstract String getSymbol(String isoCode)
Returns the symbol for the currency with the provided ISO code. If there is no data for the ISO code, substitutes isoCode or returns null.

Parameters:
isoCode - the three-letter ISO code.
Returns:
the display name.
Status:
Draft ICU 4.4.

getName

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.

Parameters:
isoCode - the three-letter ISO code
Returns:
the display name
Status:
Draft ICU 4.4.

getPluralName

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 - the three-letter ISO code
pluralKey - the plural key, for example "one", "other"
Returns:
the display name
See Also:
PluralRules
Status:
Draft ICU 4.4.

symbolMap

public abstract Map<String,String> symbolMap()
Returns a mapping from localized symbols and currency codes to currency codes. The returned map is unmodifiable.

Returns:
the map
Status:
Draft ICU 4.4.

nameMap

public abstract Map<String,String> nameMap()
Returns a mapping from localized names (standard and plural) to currency codes. The returned map is unmodifiable.

Returns:
the map
Status:
Draft ICU 4.4.


Copyright (c) 2012 IBM Corporation and others.