- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,List<V>>
-
- com.gluonhq.connect.MultiValuedMap<K,V>
-
- Type Parameters:
K
- the type of keys maintained by this mapV
- the type of mapped values
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,List<V>>
public class MultiValuedMap<K,V> extends HashMap<K,List<V>>
A Map of key-value pairs where a key can contain multiple values.- See Also:
- Serialized Form
-
-
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 Constructor Description MultiValuedMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
putMap(Map<K,V> map)
Copies all of the mappings from the specified map into this map.List<V>
putSingle(K key, V value)
Add the provided value to the list of values associated with this key.-
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
-
-