Package dev.prozilla.pine.common.util
Class MultiValueMap<K,V>
java.lang.Object
java.util.AbstractMap<K,List<V>>
java.util.HashMap<K,List<V>>
dev.prozilla.pine.common.util.MultiValueMap<K,V>
- Type Parameters:
K- The type of keys in this mapV- The type of values in this map
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,List<V>>
Implementation of a hash map which supports multiple values per key.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAll(K key, Collection<? extends V> newValues) removeValue(K key, V value) set(K key, Collection<? extends V> values) setIfAbsent(K key, V value) intMethods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
MultiValueMap
public MultiValueMap()
-
-
Method Details
-
getFirst
-
getLast
-
get
-
add
-
addAll
-
removeValue
-
set
-
set
-
set
-
setIfAbsent
-
flatValues
-
valueSize
- Throws:
IllegalArgumentException
-