harpoon.Util.Collections
Class MapWrapper

java.lang.Object
  |
  +--harpoon.Util.Collections.MapWrapper
All Implemented Interfaces:
Map
Direct Known Subclasses:
GenericInvertibleMap

public class MapWrapper
extends Object
implements Map

MapWrapper is a class that acts as a proxy for another backing map, to allow for easy extension of Map functionality while not restricting developers to one particular Map implementation.

Version:
$Id: MapWrapper.java,v 1.2 2002/02/25 21:09:06 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
MapWrapper(Map map)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object o)
           
 boolean containsValue(Object o)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object o)
           
 int hashCode()
           
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object k, Object v)
           
 void putAll(Map m)
           
 Object remove(Object o)
           
 int size()
           
 String toString()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapWrapper

public MapWrapper(Map map)
Method Detail

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object o)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object o)
Specified by:
containsValue in interface Map

get

public Object get(Object o)
Specified by:
get in interface Map

put

public Object put(Object k,
                  Object v)
Specified by:
put in interface Map

remove

public Object remove(Object o)
Specified by:
remove in interface Map

putAll

public void putAll(Map m)
Specified by:
putAll in interface Map

clear

public void clear()
Specified by:
clear in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Specified by:
equals in interface Map
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object