Package com.globalmentor.collections
Class IdentityHashSetMap<K,V>
java.lang.Object
com.globalmentor.collections.MapDecorator<K,C>
com.globalmentor.collections.AbstractDecoratorCollectionMap<K,V,Set<V>>
com.globalmentor.collections.IdentityHashSetMap<K,V>
- Type Parameters:
K
- The type of map key.V
- The type of map value.
- All Implemented Interfaces:
CollectionMap<K,
,V, Set<V>> Map<K,
Set<V>>
An decorator map that stores an
IdentityHashSet
of values for each key, with special methods for retrieving single values.- Author:
- Garret Wilson
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.globalmentor.collections.MapDecorator
map
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a collection in which to store values.Methods inherited from class com.globalmentor.collections.AbstractDecoratorCollectionMap
addItem, getCollection, getItem, getItemCount, getItems, hasItems, removeItem
Methods inherited from class com.globalmentor.collections.MapDecorator
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
IdentityHashSetMap
Map constructor.- Parameters:
map
- The map this map should decorate.- Throws:
NullPointerException
- if the provided map isnull
.
-
-
Method Details
-
createCollection
Creates a collection in which to store values. This version returns anIdentityHashSet
.- Returns:
- The collections with the values stored.
-