public class CurrencyList extends java.lang.Object implements java.lang.Iterable<CurrencyData>
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,CurrencyData> |
dataMapJava
Map of currency codes to CurrencyData.
|
protected JavaScriptObject |
dataMapNative
JS map of currency codes to CurrencyData objects.
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
namesMapJava
Map of currency codes to localized currency names.
|
protected JavaScriptObject |
namesMapNative
JS map of currency codes to localized currency names.
|
Constructor and Description |
---|
CurrencyList() |
Modifier and Type | Method and Description |
---|---|
static CurrencyList |
get()
Return the singleton instance of CurrencyList.
|
CurrencyData |
getDefault()
Return the default currency data for this locale.
|
protected CurrencyData |
getDefaultJava()
Return the default currency data for this locale.
|
protected CurrencyData |
getDefaultNative()
Return the default currency data for this locale.
|
java.util.Iterator<CurrencyData> |
iterator()
Returns an iterator for the list of currencies.
|
java.util.Iterator<CurrencyData> |
iterator(boolean includeDeprecated)
Returns an iterator for the list of currencies, optionally including
deprecated ones.
|
protected java.util.HashMap<java.lang.String,CurrencyData> |
loadCurrencyMapJava()
Loads the currency map.
|
protected JavaScriptObject |
loadCurrencyMapNative()
Loads the currency map from a JS object literal.
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
loadNamesMapJava()
Loads the currency names map.
|
protected JavaScriptObject |
loadNamesMapNative()
Loads the currency names map from a JS object literal.
|
CurrencyData |
lookup(java.lang.String currencyCode)
Lookup a currency based on the ISO4217 currency code.
|
java.lang.String |
lookupName(java.lang.String currencyCode)
Lookup a currency name based on the ISO4217 currency code.
|
protected static JavaScriptObject |
overrideMap(JavaScriptObject original,
JavaScriptObject override)
Add all entries in
override to the original map, replacing
any existing entries. |
protected java.util.HashMap<java.lang.String,CurrencyData> dataMapJava
protected JavaScriptObject dataMapNative
protected java.util.HashMap<java.lang.String,java.lang.String> namesMapJava
dataMapJava
above so that the names can be completely removed by
the compiler if they are not used.protected JavaScriptObject namesMapNative
dataMapNative
above so that the names can be completely
removed by the compiler if they are not used. Each currency code is assumed
to be a valid JS object key.public static CurrencyList get()
protected static final JavaScriptObject overrideMap(JavaScriptObject original, JavaScriptObject override)
override
to the original map, replacing
any existing entries. This is used by subclasses that need to slightly
alter the data used by the parent locale.public CurrencyData getDefault()
public final java.util.Iterator<CurrencyData> iterator()
iterator
in interface java.lang.Iterable<CurrencyData>
public final java.util.Iterator<CurrencyData> iterator(boolean includeDeprecated)
includeDeprecated
- true if deprecated currencies should be includedpublic final CurrencyData lookup(java.lang.String currencyCode)
currencyCode
- ISO4217 currency codepublic final java.lang.String lookupName(java.lang.String currencyCode)
currencyCode
- ISO4217 currency codeprotected CurrencyData getDefaultJava()
protected CurrencyData getDefaultNative()
protected java.util.HashMap<java.lang.String,CurrencyData> loadCurrencyMapJava()
protected JavaScriptObject loadCurrencyMapNative()
protected java.util.HashMap<java.lang.String,java.lang.String> loadNamesMapJava()
protected JavaScriptObject loadNamesMapNative()