com.ibm.icu.text
Class CurrencyDisplayNames

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

public abstract class CurrencyDisplayNames
extends java.lang.Object

Returns currency names localized for a locale.

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.
abstract  ULocale getLocale()
          Returns the locale used to determine how to translate the currency names.
abstract  java.lang.String getName(java.lang.String isoCode)
          Returns the 'long name' for the currency with the provided ISO code.
abstract  java.lang.String getPluralName(java.lang.String isoCode, java.lang.String pluralKey)
          Returns a 'plural name' for the currency with the provided ISO code corresponding to the pluralKey.
abstract  java.lang.String getSymbol(java.lang.String isoCode)
          Returns the symbol for the currency with the provided ISO code.
static boolean hasData()
          Returns true if currency display name data is available.
abstract  java.util.Map<java.lang.String,java.lang.String> nameMap()
          Returns a mapping from localized names (standard and plural) to currency codes.
abstract  java.util.Map<java.lang.String,java.lang.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.

Parameters:
locale - the locale into which to localize the names
Returns:
a CurrencyDisplayNames
Status:
Draft ICU 4.4.

hasData

public static boolean hasData()
Returns true if currency display name data is available.

Returns:
true if currency display name data is available
Status:
Draft ICU 4.4.

getLocale

public abstract ULocale getLocale()
Returns the locale used to determine how to translate the currency names. This is not necessarily the same locale passed to getInstance(ULocale). If hasData is false, returns ULocale.ROOT.

Returns:
the display locale
Status:
Draft ICU 4.4.

getSymbol

public abstract java.lang.String getSymbol(java.lang.String isoCode)
Returns the symbol for the currency with the provided ISO code. If hasData is false, returns the provided ISO code.

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

getName

public abstract java.lang.String getName(java.lang.String isoCode)
Returns the 'long name' for the currency with the provided ISO code. If hasData is false, returns the provided ISO code.

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

getPluralName

public abstract java.lang.String getPluralName(java.lang.String isoCode,
                                               java.lang.String pluralKey)
Returns a 'plural name' for the currency with the provided ISO code corresponding to the pluralKey. If hasData is false, returns the provided ISO code.

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 java.util.Map<java.lang.String,java.lang.String> symbolMap()
Returns a mapping from localized symbols and currency codes to currency codes. If hasData is false, returns an empty map. The returned map is unmodifiable.

Returns:
the map
Status:
Draft ICU 4.4.

nameMap

public abstract java.util.Map<java.lang.String,java.lang.String> nameMap()
Returns a mapping from localized names (standard and plural) to currency codes. If hasData is false, returns an empty map. The returned map is unmodifiable.

Returns:
the map
Status:
Draft ICU 4.4.


Copyright (c) 2011 IBM Corporation and others.