Package org.apache.wayang.core.util
Class MultiMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,Set<V>>
org.apache.wayang.core.util.MultiMap<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,Set<V>>
Maps keys to multiple values. Each key value pair is unique.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
MultiMap
public MultiMap()
-
-
Method Details
-
putSingle
Associate a key with a new value.- Parameters:
key- to associate withvalue- will be associated- Returns:
- whether the value was not yet associated with the key
-
removeSingle
Disassociate a key with a value.- Parameters:
key- to disassociate fromvalue- will be disassociated- Returns:
- whether the value was associated with the key
-