GWT 2.0.3

com.google.gwt.i18n.client
Class CurrencyList

java.lang.Object
  extended by com.google.gwt.i18n.client.CurrencyList
All Implemented Interfaces:
java.lang.Iterable<CurrencyData>

public class CurrencyList
extends java.lang.Object
implements java.lang.Iterable<CurrencyData>

Generated class containing all the CurrencyImpl instances. This is just the fallback in case the I18N module is not included.


Field Summary
protected  JavaScriptObject dataMap
          JS Object which contains a map of currency codes to CurrencyDataImpl objects.
protected  JavaScriptObject namesMap
          JS Object which contains a map of currency codes to localized currency names.
 
Constructor Summary
CurrencyList()
           
 
Method Summary
protected  void ensureCurrencyMap()
          Ensure that the map of currency data has been initialized.
protected  void ensureNamesMap()
          Ensure that the map of currency data has been initialized.
static CurrencyList get()
          Return the singleton instance of CurrencyList.
 CurrencyData getDefault()
          Return the default currency data for this locale.
protected  CurrencyData getEntry(java.lang.String code)
          Directly reference an entry in the currency map JSO.
protected  java.lang.String getNamesEntry(java.lang.String code)
          Directly reference an entry in the currency names map JSO.
protected static boolean isDeprecated(CurrencyData currencyData)
           
 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  void loadCurrencyMap()
          Loads the currency map from a JS object literal.
protected  void loadNamesMap()
          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  void overrideCurrencyMap(JavaScriptObject override)
          Add all entries in override to the currency data map, replacing any existing entries.
protected  void overrideNamesMap(JavaScriptObject override)
          Add all entries in override to the currency name map, replacing any existing entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataMap

protected JavaScriptObject dataMap
JS Object which contains a map of currency codes to CurrencyDataImpl objects. Each currency code is assumed to be a valid JS object key.


namesMap

protected JavaScriptObject namesMap
JS Object which contains a map of currency codes to localized currency names. This is kept separate from dataMap 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.

Constructor Detail

CurrencyList

public CurrencyList()
Method Detail

get

public static CurrencyList get()
Return the singleton instance of CurrencyList.


isDeprecated

protected static boolean isDeprecated(CurrencyData currencyData)

getDefault

public CurrencyData getDefault()
Return the default currency data for this locale. Generated implementations override this method.


iterator

public final java.util.Iterator<CurrencyData> iterator()
Returns an iterator for the list of currencies. Deprecated currencies will not be included.

Specified by:
iterator in interface java.lang.Iterable<CurrencyData>

iterator

public final java.util.Iterator<CurrencyData> iterator(boolean includeDeprecated)
Returns an iterator for the list of currencies, optionally including deprecated ones.

Parameters:
includeDeprecated - true if deprecated currencies should be included

lookup

public final CurrencyData lookup(java.lang.String currencyCode)
Lookup a currency based on the ISO4217 currency code.

Parameters:
currencyCode - ISO4217 currency code
Returns:
currency data, or null if code not found

lookupName

public final java.lang.String lookupName(java.lang.String currencyCode)
Lookup a currency name based on the ISO4217 currency code.

Parameters:
currencyCode - ISO4217 currency code
Returns:
name of the currency, or null if code not found

ensureCurrencyMap

protected final void ensureCurrencyMap()
Ensure that the map of currency data has been initialized.


ensureNamesMap

protected final void ensureNamesMap()
Ensure that the map of currency data has been initialized.


getEntry

protected final CurrencyData getEntry(java.lang.String code)
Directly reference an entry in the currency map JSO.

Parameters:
code - ISO4217 currency code
Returns:
currency data

getNamesEntry

protected final java.lang.String getNamesEntry(java.lang.String code)
Directly reference an entry in the currency names map JSO.

Parameters:
code - ISO4217 currency code
Returns:
currency name, or the currency code if not known

loadCurrencyMap

protected void loadCurrencyMap()
Loads the currency map from a JS object literal. Generated implementations override this method.


loadNamesMap

protected void loadNamesMap()
Loads the currency names map from a JS object literal. Generated implementations override this method.


overrideCurrencyMap

protected final void overrideCurrencyMap(JavaScriptObject override)
Add all entries in override to the currency data map, replacing any existing entries. This is used by subclasses that need to slightly alter the data used by the parent locale.

Parameters:
override - JS object with currency code -> CurrencyData pairs

overrideNamesMap

protected final void overrideNamesMap(JavaScriptObject override)
Add all entries in override to the currency name map, replacing any existing entries. This is used by subclasses that need to slightly alter the data used by the parent locale.

Parameters:
override - JS object with currency code -> name pairs

GWT 2.0.3