public class MultiMap extends HashMap
HashMap, which makes it possible to map Keys to multiple Values.
key=idnetifier;value=LinkedList.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
MultiMap()
Creates new Multimap Object with size 10.
|
MultiMap(int size)
Creates new Multimap Object with specified size.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
put(Object key,
Object value)
Assosiates
value with key in this map. |
void |
putAll(Map t)
Appends the values of the specified
map to this map. |
boolean |
remove(Object key,
Object value)
Removes specified
value associeated with specified key. |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic MultiMap()
public MultiMap(int size)
size - sizepublic Object put(Object key, Object value)
value with key in this map. Instead of replace the previous
value for a key,it is possible to have multiple values for one key possible.public void putAll(Map t)
map to this map. Instead of replace the previous
value for a key, it is possible multiple values for one key possible.Copyright © 2012–2026 cismet GmbH. All rights reserved.