public class IdentityMultiMap<K,V>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.IdentityHashMap<K,java.util.Set<V>> |
map
The underlying map.
|
Constructor and Description |
---|
IdentityMultiMap()
Creates an empty multi-map.
|
Modifier and Type | Method and Description |
---|---|
@Nullable java.util.Set<V> |
get(K key)
Returns the set of values that correspond to the given key in the map.
|
void |
put(K key,
V value)
Adds a key-value pair to the multimap.
|