gate.util
Class OptionsMap
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--gate.util.OptionsMap
- All Implemented Interfaces:
- Cloneable, Map, Serializable
- public class OptionsMap
- extends HashMap
A map that stores values as strings and provides support for converting some
frequently used types to and from string
- See Also:
- Serialized Form
Fields inherited from class java.util.HashMap |
|
Method Summary |
Boolean |
getBoolean(Object key)
If the object stored under key is a Boolean then returns its value
otherwise returns null; |
Font |
getFont(Object key)
If the object stored under key is a String then returns its value
otherwise returns null; |
Integer |
getInt(Object key)
If the object stored under key is an Integer then returns its value
otherwise returns null; |
String |
getString(Object key)
If the object stored under key is a String then returns its value
otherwise returns null; |
Object |
put(Object key,
Object value)
Converts the value to string using its toString() method and then stores it |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values |
OptionsMap
public OptionsMap()
put
public Object put(Object key,
Object value)
- Converts the value to string using its toString() method and then stores it
- Specified by:
put
in interface Map
- Overrides:
put
in class HashMap
getInt
public Integer getInt(Object key)
- If the object stored under key is an Integer then returns its value
otherwise returns null;
getBoolean
public Boolean getBoolean(Object key)
- If the object stored under key is a Boolean then returns its value
otherwise returns null;
getString
public String getString(Object key)
- If the object stored under key is a String then returns its value
otherwise returns null;
getFont
public Font getFont(Object key)
- If the object stored under key is a String then returns its value
otherwise returns null;