Dictionary is bound to a named JavaScript object that resides in the global namespace of the host page's window object. The bound JavaScript object is used directly as an associative array. For example, suppose you define the following JavaScript object in your host page: {@gwt.include com/google/gwt/examples/i18n/ThemeDictionaryExample.js}You can then use a Dictionary to access the key/value pairs above: {@example com.google.gwt.examples.i18n.ThemeDictionaryExample#useThemeDictionary()}
Unlike the family of interfaces that extend {@link com.google.gwt.i18n.client.Localizable} which support staticinternationalization, the Dictionary class is fully dynamic. As a result, a variety of error conditions (particularly those involving key mismatches) cannot be caught until runtime. Similarly, the GWT compiler is unable discard unused dictionary values since the structure cannot be statically analyzed.
locale client property. Thus, Dictionary is the most flexible of the internationalization types and may provide the simplest form of integration with existing localization systems which were not specifically designed to use GWT's locale client property. See {@link com.google.gwt.i18n.client.Localizable} for background on thelocale client property.
com.google.gwt.i18n.I18N. {@gwt.include com/google/gwt/examples/i18n/InheritsExample.gwt.xml}
@author Zhiliang Wang [qieqie.wang@gmail.com] @see BinaryDictionary @see HashBinaryDictionary @since 1.0
Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values. Every key and every value is an object. In any one Dictionary object, every key is associated with at most one value. Given a Dictionary and a key, the associated element can be looked up. Any non-null object can be used as a key and as a value. As a rule, the equals method should be used by implementations of this class to decide if two keys are the same.
NOTE: This class is obsolete. New implementations should implement the Map interface, rather than extending this class. @author unascribed @version 1.24, 11/17/05 @see java.util.Map @see java.lang.Object#equals(java.lang.Object) @see java.lang.Object#hashCode() @see java.util.Hashtable @since JDK1.0
@author Zhiliang Wang [qieqie.wang@gmail.com] @see BinaryDictionary @see HashBinaryDictionary @since 1.0
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |