public class TranslatingMap
extends java.lang.Object
implements java.util.Map
| Constructor and Description |
|---|
TranslatingMap(java.util.Map source) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Iterator |
elements()
Returns an enumeration of the elements.
|
java.util.Set |
entrySet() |
java.lang.Object |
get(java.lang.Object key)
Gets the object associated with the specified key in the Map.
|
protected java.util.Map |
getSource() |
boolean |
isEmpty()
Returns true if the Map contains no elements.
|
java.util.Iterator |
keys()
Returns an enumeration of the Map's keys.
|
java.util.Set |
keySet() |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts the specified element into the Map, using the specified key.
|
void |
putAll(java.util.Map map) |
java.lang.Object |
remove(java.lang.Object key)
Removes the element corresponding to the key.
|
int |
size()
Returns the number of elements contained within the Map.
|
protected java.lang.Object |
translateElement(java.lang.Object element) |
protected java.lang.Object |
translateKey(java.lang.Object key) |
protected java.lang.Object |
translateMapping(java.lang.Object key,
java.lang.Object element) |
java.util.Collection |
values() |
public int size()
size in interface java.util.Mappublic boolean isEmpty()
isEmpty in interface java.util.Mappublic java.util.Iterator keys()
public java.util.Iterator elements()
public java.lang.Object get(java.lang.Object key)
get in interface java.util.Mapkey - the key in the hash tableMap.put(K, V)public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapkey - the specified hashtable keyvalue - the specified elementjava.lang.NullPointerException - If the value of the specified element is null.Implementation needs work.public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Mapkey - the key that needs to be removedprotected java.lang.Object translateKey(java.lang.Object key)
protected java.lang.Object translateElement(java.lang.Object element)
protected java.lang.Object translateMapping(java.lang.Object key,
java.lang.Object element)
protected java.util.Map getSource()
public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Mappublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Mappublic void putAll(java.util.Map map)
putAll in interface java.util.Mappublic void clear()
clear in interface java.util.Mappublic java.util.Set keySet()
keySet in interface java.util.Mappublic java.util.Set entrySet()
entrySet in interface java.util.Mappublic java.util.Collection values()
values in interface java.util.Map