com.taco.data
Class MapToDictionaryAdapter

java.lang.Object
  extended by java.util.Dictionary
      extended by com.taco.data.MapToDictionaryAdapter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class MapToDictionaryAdapter
extends java.util.Dictionary
implements java.lang.Cloneable, java.io.Serializable, java.util.Map

An adapter from a Map to a Dictionary.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry
 
Field Summary
protected  java.util.Map _map
          The map this instance adapts.
 
Constructor Summary
MapToDictionaryAdapter(java.util.Map map)
           
 
Method Summary
 void clear()
           
 java.lang.Object clone(java.lang.Object obj)
          Perform a deep clone; have the clone adapt a clone of this instance's adapted map.
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Enumeration elements()
           
 java.util.Set entrySet()
           
 boolean equals(java.lang.Object obj)
          Return _map.equals(obj).
 java.lang.Object get(java.lang.Object key)
           
 int hashCode()
          Returns the hashcode of the adapted map.
 boolean isEmpty()
           
 java.util.Enumeration keys()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
 int size()
           
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_map

protected java.util.Map _map
The map this instance adapts. This is not final so that a clone can have its field set to an independent instance.

Constructor Detail

MapToDictionaryAdapter

public MapToDictionaryAdapter(java.util.Map map)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Return _map.equals(obj). This may be confusing since this class is a Dictionary.

Specified by:
equals in interface java.util.Map
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hashcode of the adapted map.

Specified by:
hashCode in interface java.util.Map
Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone(java.lang.Object obj)
                       throws java.lang.CloneNotSupportedException
Perform a deep clone; have the clone adapt a clone of this instance's adapted map.

Throws:
java.lang.CloneNotSupportedException

elements

public java.util.Enumeration elements()
Specified by:
elements in class java.util.Dictionary

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Specified by:
get in class java.util.Dictionary

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map
Specified by:
isEmpty in class java.util.Dictionary

keys

public java.util.Enumeration keys()
Specified by:
keys in class java.util.Dictionary

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
Specified by:
put in class java.util.Dictionary

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map
Specified by:
remove in class java.util.Dictionary

size

public int size()
Specified by:
size in interface java.util.Map
Specified by:
size in class java.util.Dictionary

clear

public void clear()
Specified by:
clear in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map