Package net.cscott.jutil
Class GenericInvertibleMap<K,V>
java.lang.Object
net.cscott.jutil.MapWrapper<K,V>
net.cscott.jutil.GenericInvertibleMap<K,V>
- All Implemented Interfaces:
Map<K,,V> InvertibleMap<K,V>
GenericInvertibleMap is a default implementation of
InvertibleMap. It returns unmodifiable inverted
views of the mappings it maintains.- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an invertible map backed by a HashMap.GenericInvertibleMap(Map<K, V> m) GenericInvertibleMap(MapFactory<K, V> mf, MultiMapFactory<V, K> mmf) Constructs an invertible map backed by a map constructed bymfand an inverted map constructed bymmf. -
Method Summary
Methods inherited from class net.cscott.jutil.MapWrapper
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, toString, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
GenericInvertibleMap
public GenericInvertibleMap()Constructs an invertible map backed by a HashMap. -
GenericInvertibleMap
Constructs an invertible map backed by a map constructed bymfand an inverted map constructed bymmf. -
GenericInvertibleMap
-
-
Method Details
-
wrapped
Description copied from class:MapWrapperImplementations should return the wrappedMaphere.- Specified by:
wrappedin classMapWrapper<K,V>
-
invert
Returns an unmodifiable inverted view ofthis.- Specified by:
invertin interfaceInvertibleMap<K,V>
-
put
-
putAll
-
remove
-