Package org.apache.wayang.core.util
Class MultiMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<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.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
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
-