K - V - public class MultiMap<K,V> extends HashMap<K,List<V>>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
MultiMap()
Constructor
|
MultiMap(int initialCapacity)
Constructor
|
MultiMap(int initialCapacity,
float loadFactor)
Constructor
|
MultiMap(Map<? extends K,? extends List<V>> m)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(K key,
V value)
Adds value to the specified key
|
V |
getFirstValue(K key)
Gets the first value in the value list
|
void |
removeValue(K key,
V value)
Removes value from the specified key
|
void |
replaceValues(K key,
V value)
Replaces all existing values with the specified value.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic MultiMap()
HashMap()public MultiMap(int initialCapacity,
float loadFactor)
initialCapacity - loadFactor - HashMap(int, float)public MultiMap(int initialCapacity)
initialCapacity - HashMap(int)public MultiMap(Map<? extends K,? extends List<V>> m)
m - HashMap(Map)public void addValue(K key, V value)
key - value - public void removeValue(K key, V value)
key - value - public void replaceValues(K key, V value)
key - value - Copyright © 2006–2020 Apache Software Foundation. All rights reserved.