public class GenericInvertibleMap<K,V> extends MapWrapper<K,V> implements InvertibleMap<K,V>
GenericInvertibleMap is a default implementation of
InvertibleMap. It returns unmodifiable inverted
views of the mappings it maintains.| Constructor and Description |
|---|
GenericInvertibleMap()
Constructs an invertible map backed by a HashMap.
|
GenericInvertibleMap(java.util.Map<K,V> m) |
GenericInvertibleMap(MapFactory<K,V> mf,
MultiMapFactory<V,K> mmf)
Constructs an invertible map backed by a map constructed by
mf and an inverted map constructed by
mmf. |
| Modifier and Type | Method and Description |
|---|---|
MultiMap<V,K> |
invert()
Returns an unmodifiable inverted view of
this. |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> m) |
V |
remove(java.lang.Object key) |
protected java.util.Map<K,V> |
wrapped() |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, toString, valuespublic GenericInvertibleMap()
public GenericInvertibleMap(MapFactory<K,V> mf, MultiMapFactory<V,K> mmf)
mf and an inverted map constructed by
mmf.Copyright (c) 2006 C. Scott Ananian