Top Inners Fields Constructors Methods
com.ibm.icu.impl

public Class ICUCurrencyDisplayInfoProvider

extends Object
implements CurrencyDisplayInfoProvider
Class Inheritance
All Implemented Interfaces
com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfoProvider
Imports
java.lang.ref.SoftReference, java.util.HashMap, .Map, .MissingResourceException, .Set, com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfo, .CurrencyData.CurrencyDisplayInfoProvider, .CurrencyData.CurrencyFormatInfo, .CurrencyData.CurrencySpacingInfo, .ICUResourceBundle.OpenType, com.ibm.icu.util.ICUException, .ULocale, .UResourceBundle

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo

This class performs data loading for currencies and keeps data in lightweight cache.

Field Summary

Modifier and TypeField and Description
private volatile ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo
currencyDisplayInfoCache

Single-item cache for ICUCurrencyDisplayInfo keyed by locale.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CurrencyData.CurrencyDisplayInfo
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currencyDisplayInfoCacheback to summary
private volatile ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo currencyDisplayInfoCache

Single-item cache for ICUCurrencyDisplayInfo keyed by locale.

Constructor Detail

ICUCurrencyDisplayInfoProviderback to summary
public ICUCurrencyDisplayInfoProvider()

Method Detail

getInstanceback to summary
public CurrencyData.CurrencyDisplayInfo getInstance(ULocale locale, boolean withFallback)

Implements com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfoProvider.getInstance.

Annotations
@Override
hasDataback to summary
public boolean hasData()

Implements com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfoProvider.hasData.

Annotations
@Override
com.ibm.icu.impl back to summary

pack-priv Class ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo

extends CurrencyDisplayInfo
Class Inheritance

This class performs data loading for currencies and keeps data in lightweight cache.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
private volatile ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData
formattingDataCache

Single-item cache for getName(), getSymbol(), and getFormatInfo().

pack-priv final ULocale
private volatile SoftReference<ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData>
parsingDataCache

Cache for symbolMap() and nameMap().

private volatile String[]
pluralsDataCache

Single-item cache for getPluralName().

private final ICUResourceBundle
private volatile CurrencyData.CurrencySpacingInfo
spacingInfoCache

Cache for getSpacingInfo().

private volatile Map<String, String>
unitPatternsCache

Cache for getUnitPatterns().

private volatile ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol
variantSymbolCache

Single-item cache for variant symbols.

Constructor Summary

AccessConstructor and Description
public
ICUCurrencyDisplayInfo(ULocale locale, ICUResourceBundle rb, boolean fallback)

Method Summary

Modifier and TypeMethod and Description
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData
pack-priv String[]
pack-priv CurrencyData.CurrencySpacingInfo
pack-priv Map<String, String>
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol
fetchVariantSymbol(String isoCode, String variant)

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

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getFormalSymbol.

Returns the formal symbol for the currency with the provided ISO code.
public CurrencyData.CurrencyFormatInfo
public String
getName(String
the three-letter ISO code
isoCode
)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getName.

Returns the 'long name' for the currency with the provided ISO code.
public String
getNarrowSymbol(String
the three-letter ISO code.
isoCode
)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getNarrowSymbol.

Returns the narrow symbol for the currency with the provided ISO code.
public String
getPluralName(String
the three-letter ISO code
isoCode
,
String
the plural key, for example "one", "other"
pluralKey
)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getPluralName.

Returns a 'plural name' for the currency with the provided ISO code corresponding to the pluralKey.
public CurrencyData.CurrencySpacingInfo
public String
getSymbol(String
the three-letter ISO code.
isoCode
)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getSymbol.

Returns the symbol for the currency with the provided ISO code.
public ULocale
getULocale()

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getULocale.

Returns the locale used to determine how to translate the currency names.
public Map<String, String>
public String
getVariantSymbol(String
the three-letter ISO code.
isoCode
)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getVariantSymbol.

Returns the variant symbol for the currency with the provided ISO code.
public Map<String, String>
nameMap()

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.nameMap.

Returns a mapping from localized names (standard and plural) to currency codes.
public Map<String, String>
symbolMap()

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.symbolMap.

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

Field Detail

fallbackback to summary
pack-priv final boolean fallback
formattingDataCacheback to summary
private volatile ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData formattingDataCache

Single-item cache for getName(), getSymbol(), and getFormatInfo(). Holds data for only one currency. If another currency is requested, the old cache item is overwritten.

localeback to summary
pack-priv final ULocale locale
parsingDataCacheback to summary
private volatile SoftReference<ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData> parsingDataCache

Cache for symbolMap() and nameMap().

pluralsDataCacheback to summary
private volatile String[] pluralsDataCache

Single-item cache for getPluralName().

array[0] is the ISO code.
array[1+p] is the plural name where p=standardPlural.ordinal().

Holds data for only one currency. If another currency is requested, the old cache item is overwritten.

rbback to summary
private final ICUResourceBundle rb
spacingInfoCacheback to summary
private volatile CurrencyData.CurrencySpacingInfo spacingInfoCache

Cache for getSpacingInfo().

unitPatternsCacheback to summary
private volatile Map<String, String> unitPatternsCache

Cache for getUnitPatterns().

variantSymbolCacheback to summary
private volatile ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol variantSymbolCache

Single-item cache for variant symbols. Holds data for only one currency. If another currency is requested, the old cache item is overwritten.

Constructor Detail

ICUCurrencyDisplayInfoback to summary
public ICUCurrencyDisplayInfo(ULocale locale, ICUResourceBundle rb, boolean fallback)

Method Detail

fetchFormattingDataback to summary
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData fetchFormattingData(String isoCode)
fetchParsingDataback to summary
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData fetchParsingData()
fetchPluralsDataback to summary
pack-priv String[] fetchPluralsData(String isoCode)
fetchSpacingInfoback to summary
pack-priv CurrencyData.CurrencySpacingInfo fetchSpacingInfo()
fetchUnitPatternsback to summary
pack-priv Map<String, String> fetchUnitPatterns()
fetchVariantSymbolback to summary
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol fetchVariantSymbol(String isoCode, String variant)
getFormalSymbolback to summary
public String getFormalSymbol(String isoCode)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getFormalSymbol.

Doc from com.ibm.icu.text.CurrencyDisplayNames.getFormalSymbol.

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.

Annotations
@Override
getFormatInfoback to summary
public CurrencyData.CurrencyFormatInfo getFormatInfo(String isoCode)

Implements abstract com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfo.getFormatInfo.

Annotations
@Override
getNameback to summary
public String getName(String isoCode)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getName.

Doc from com.ibm.icu.text.CurrencyDisplayNames.getName.

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

Annotations
@Override
getNarrowSymbolback to summary
public String getNarrowSymbol(String isoCode)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getNarrowSymbol.

Doc from com.ibm.icu.text.CurrencyDisplayNames.getNarrowSymbol.

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.

Annotations
@Override
getPluralNameback to summary
public String getPluralName(String isoCode, String pluralKey)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getPluralName.

Doc from com.ibm.icu.text.CurrencyDisplayNames.getPluralName.

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

Annotations
@Override
getSpacingInfoback to summary
public CurrencyData.CurrencySpacingInfo getSpacingInfo()

Implements abstract com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfo.getSpacingInfo.

Annotations
@Override
getSymbolback to summary
public String getSymbol(String isoCode)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getSymbol.

Doc from com.ibm.icu.text.CurrencyDisplayNames.getSymbol.

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.

Annotations
@Override
getULocaleback to summary
public ULocale getULocale()

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getULocale.

Doc from com.ibm.icu.text.CurrencyDisplayNames.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

Annotations
@Override
getUnitPatternsback to summary
public Map<String, String> getUnitPatterns()

Implements abstract com.ibm.icu.impl.CurrencyData.CurrencyDisplayInfo.getUnitPatterns.

Annotations
@Override
getVariantSymbolback to summary
public String getVariantSymbol(String isoCode)

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.getVariantSymbol.

Doc from com.ibm.icu.text.CurrencyDisplayNames.getVariantSymbol.

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.

Annotations
@Override
nameMapback to summary
public Map<String, String> nameMap()

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.nameMap.

Doc from com.ibm.icu.text.CurrencyDisplayNames.nameMap.

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

Returns:Map<String, String>

the map

Annotations
@Override
symbolMapback to summary
public Map<String, String> symbolMap()

Implements abstract com.ibm.icu.text.CurrencyDisplayNames.symbolMap.

Doc from com.ibm.icu.text.CurrencyDisplayNames.symbolMap.

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

Returns:Map<String, String>

the map

Annotations
@Override
com.ibm.icu.impl back to summary

private final Class ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.CurrencySink

extends Sink
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
private void
public void
put(UResource.Key
Initially the key string of the enumeration-start resource. Empty if the enumeration starts at the top level of the bundle. Reuse for output values from Array and Table getters.
key
,
UResource.Value
Call getArray() or getTable() as appropriate. Then reuse for output values from Array and Table getters.
value
,
boolean
true if the bundle has no parent; that is, its top-level table has the nofallback attribute, or it is the root bundle of a locale tree.
isRoot
)

Implements abstract com.ibm.icu.impl.UResource.Sink.put.

The entrypoint method delegates to helper methods for each of the types of tables found in the currency data.

Field Detail

entrypointTableback to summary
pack-priv final ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.CurrencySink.EntrypointTable entrypointTable
formattingDataback to summary
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData formattingData
noRootback to summary
pack-priv final boolean noRoot
parsingDataback to summary
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData parsingData
pluralsDataback to summary
pack-priv String[] pluralsData
spacingInfoback to summary
pack-priv CurrencyData.CurrencySpacingInfo spacingInfo
unitPatternsback to summary
pack-priv Map<String, String> unitPatterns
variantSymbolback to summary
pack-priv ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol variantSymbol

Constructor Detail

CurrencySinkback to summary
pack-priv CurrencySink(boolean noRoot, ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.CurrencySink.EntrypointTable entrypointTable)

Method Detail

consumeCurrenciesEntryback to summary
pack-priv void consumeCurrenciesEntry(UResource.Key key, UResource.Value value)
consumeCurrenciesTableback to summary
pack-priv void consumeCurrenciesTable(UResource.Key key, UResource.Value value)
consumeCurrenciesVariantEntryback to summary
pack-priv void consumeCurrenciesVariantEntry(UResource.Key key, UResource.Value value)
consumeCurrenciesVariantTableback to summary
pack-priv void consumeCurrenciesVariantTable(UResource.Key key, UResource.Value value)
consumeCurrencyPluralsEntryback to summary
pack-priv void consumeCurrencyPluralsEntry(UResource.Key key, UResource.Value value)
consumeCurrencyPluralsTableback to summary
pack-priv void consumeCurrencyPluralsTable(UResource.Key key, UResource.Value value)
consumeCurrencySpacingTableback to summary
pack-priv void consumeCurrencySpacingTable(UResource.Key key, UResource.Value value)
consumeCurrencyUnitPatternsTableback to summary
pack-priv void consumeCurrencyUnitPatternsTable(UResource.Key key, UResource.Value value)
consumeTopTableback to summary
private void consumeTopTable(UResource.Key key, UResource.Value value)
putback to summary
public void put(UResource.Key key, UResource.Value value, boolean isRoot)

Implements abstract com.ibm.icu.impl.UResource.Sink.put.

The entrypoint method delegates to helper methods for each of the types of tables found in the currency data.

Parameters
key:UResource.Key

Doc from com.ibm.icu.impl.UResource.Sink.put.

Initially the key string of the enumeration-start resource. Empty if the enumeration starts at the top level of the bundle. Reuse for output values from Array and Table getters.

value:UResource.Value

Doc from com.ibm.icu.impl.UResource.Sink.put.

Call getArray() or getTable() as appropriate. Then reuse for output values from Array and Table getters.

isRoot:boolean

Doc from com.ibm.icu.impl.UResource.Sink.put.

true if the bundle has no parent; that is, its top-level table has the nofallback attribute, or it is the root bundle of a locale tree.

Annotations
@Override
com.ibm.icu.impl back to summary

pack-priv final Enum ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.CurrencySink.EntrypointTable

extends Enum<ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.CurrencySink.EntrypointTable>
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Constructor Detail

EntrypointTableback to summary
private EntrypointTable()
com.ibm.icu.impl back to summary

pack-priv Class ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData

extends Object
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.impl.ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.FormattingData

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv CurrencyData.CurrencyFormatInfo
pack-priv final String
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

displayNameback to summary
pack-priv String displayName
formatInfoback to summary
pack-priv CurrencyData.CurrencyFormatInfo formatInfo
isoCodeback to summary
pack-priv final String isoCode
symbolback to summary
pack-priv String symbol

Constructor Detail

FormattingDataback to summary
pack-priv FormattingData(String isoCode)
com.ibm.icu.impl back to summary

pack-priv Class ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData

extends Object
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.impl.ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.ParsingData

Field Summary

Modifier and TypeField and Description
pack-priv Map<String, String>
pack-priv Map<String, String>

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

nameToIsoCodeback to summary
pack-priv Map<String, String> nameToIsoCode
symbolToIsoCodeback to summary
pack-priv Map<String, String> symbolToIsoCode

Constructor Detail

ParsingDataback to summary
pack-priv ParsingData()
com.ibm.icu.impl back to summary

pack-priv Class ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol

extends Object
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.impl.ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo.VariantSymbol

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv String
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv
VariantSymbol(String isoCode, String variant)

Field Detail

isoCodeback to summary
pack-priv final String isoCode
symbolback to summary
pack-priv String symbol
variantback to summary
pack-priv final String variant

Constructor Detail

VariantSymbolback to summary
pack-priv VariantSymbol(String isoCode, String variant)