com.rubecula.util
Class LookupTable

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bycom.rubecula.util.StringMap
              extended bycom.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 Class Summary
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Field Summary
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
LookupTable()
           
 
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 com.rubecula.util.StringMap
get, put
 
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
 

Constructor Detail

LookupTable

public LookupTable()
Method Detail

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