pivot.wtkx
Class WTKXSerializer.NamedObjectDictionary

java.lang.Object
  extended by pivot.wtkx.WTKXSerializer.NamedObjectDictionary
All Implemented Interfaces:
Dictionary<String,Object>
Enclosing class:
WTKXSerializer

public final class WTKXSerializer.NamedObjectDictionary
extends Object
implements Dictionary<String,Object>

Dictionary used for named object lookup.

Author:
tvolkert, gbrown

Method Summary
 boolean containsKey(String key)
          Tests the existence of a key in the dictionary.
 Object get(String key)
          Retrieves a named object.
 boolean isEmpty()
          Tests the emptiness of the dictionary.
 Object put(String key, Object value)
          Sets the value of the given key, creating a new entry or replacing the existing value.
 Object remove(String key)
          Removes a key/value pair from the map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public Object get(String key)
Retrieves a named object.

Specified by:
get in interface Dictionary<String,Object>
Parameters:
key - The name of the object, relative to this loader. The values's name is the concatentation of its parent namespaces and its ID, separated by periods (e.g. "foo.bar.baz").
Returns:
The named object, or null if an object with the given name does not exist.

put

public Object put(String key,
                  Object value)
Description copied from interface: Dictionary
Sets the value of the given key, creating a new entry or replacing the existing value.

Specified by:
put in interface Dictionary<String,Object>
Parameters:
key - The key whose value is to be set.
value - The value to be associated with the given key.
Returns:
The value previously associated with the key.

remove

public Object remove(String key)
Description copied from interface: Dictionary
Removes a key/value pair from the map.

Specified by:
remove in interface Dictionary<String,Object>
Parameters:
key - The key whose mapping is to be removed.
Returns:
The value that was removed.

containsKey

public boolean containsKey(String key)
Description copied from interface: Dictionary
Tests the existence of a key in the dictionary.

Specified by:
containsKey in interface Dictionary<String,Object>
Parameters:
key - The key whose presence in the dictionary is to be tested.
Returns:
true if the key exists in the dictionary; false, otherwise.

isEmpty

public boolean isEmpty()
Description copied from interface: Dictionary
Tests the emptiness of the dictionary.

Specified by:
isEmpty in interface Dictionary<String,Object>
Returns:
true if the dictionary contains no keys; false, otherwise.