harpoon.Util.Collections
Class GenericInvertibleMap
java.lang.Object
|
+--harpoon.Util.Collections.MapWrapper
|
+--harpoon.Util.Collections.GenericInvertibleMap
- All Implemented Interfaces:
- InvertibleMap, Map
- public class GenericInvertibleMap
- extends MapWrapper
- implements InvertibleMap
GenericInvertibleMap
is a default implementation of
InvertibleMap
. It returns unmodifiable inverted
views of the mappings it maintains.
- Version:
- $Id: GenericInvertibleMap.java,v 1.2 2002/02/25 21:09:04 cananian Exp $
- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
Methods inherited from class harpoon.Util.Collections.MapWrapper |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, toString, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, values |
GenericInvertibleMap
public GenericInvertibleMap()
- Constructs an invertible map backed by a HashMap.
GenericInvertibleMap
public GenericInvertibleMap(MapFactory mf,
MultiMap.Factory mmf)
- Constructs an invertible map backed by a map constructed by
mf
and an inverted map constructed by
mmf
.
GenericInvertibleMap
public GenericInvertibleMap(Map m)
invert
public MultiMap invert()
- Returns an unmodifiable inverted view of
this
.
- Specified by:
invert
in interface InvertibleMap
put
public Object put(Object key,
Object value)
- Specified by:
put
in interface Map
- Overrides:
put
in class MapWrapper
putAll
public void putAll(Map m)
- Specified by:
putAll
in interface Map
- Overrides:
putAll
in class MapWrapper
remove
public Object remove(Object key)
- Specified by:
remove
in interface Map
- Overrides:
remove
in class MapWrapper