com.rubecula.util
Class LookupTable
java.lang.Object
java.util.AbstractMap
java.util.HashMap
com.rubecula.util.StringMap
com.rubecula.util.LookupTable
- All Implemented Interfaces:
- java.lang.Cloneable, Lookupable, java.util.Map, java.io.Serializable
- public class LookupTable
- extends StringMap
- implements Lookupable
Class
to allow storage and lookup of Presentable objects,
identified by a String key.
- Since:
- V_0_5
- Version:
- $Revision: 1.1 $
- Author:
- Robin Hillyard
- See Also:
- Serialized Form
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Method Summary |
java.lang.Object |
get(java.lang.String key)
Method to get a value from this StringMap |
java.util.Collection |
getKeys()
|
Presentable |
getValue(java.lang.String name)
Method to lookup a value by name. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
put(java.lang.String key,
Presentable value)
|
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
LookupTable
public LookupTable()
get
public java.lang.Object get(java.lang.String key)
- Description copied from class:
StringMap
- Method to get a value from this StringMap
- Overrides:
get
in class StringMap
- See Also:
Map.get(java.lang.Object)
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put
in interface java.util.Map
- Overrides:
put
in class StringMap
- See Also:
Map.put(java.lang.Object, java.lang.Object)
put
public java.lang.Object put(java.lang.String key,
Presentable value)
getValue
public Presentable getValue(java.lang.String name)
throws PresentableException
- Description copied from interface:
Lookupable
- Method to lookup a value by name.
- Specified by:
getValue
in interface Lookupable
- Parameters:
name
- the name or key to be looked up.
- Returns:
- a Presentable value corresponding to the current value of name.
- Throws:
PresentableException
- name not be found.
getKeys
public java.util.Collection getKeys()
- Specified by:
getKeys
in interface Lookupable