public class MultiMap<K,V> extends ConcurrentHashMap<K,List<V>>
ConcurrentHashMap.KeySetView<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
MultiMap() |
MultiMap(Map<K,List<V>> map) |
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
V value)
一次插入一个键值
|
boolean |
addAllValues(MultiMap<K,V> map)
增加键/值
|
void |
addValues(K key,
List<V> values)
增加键的一系列的值
|
void |
addValues(K key,
V[] values)
增加键的一系列的值
|
boolean |
containsValues(V value)
是否包含某个值
|
V |
getValue(K key,
int i)
获取值
|
List<V> |
getValues(K key)
获取值的集合
|
void |
putAllValues(Map<K,V> input)
一次插入多个键值
|
List<V> |
putValue(K key,
V value)
增加值
|
List<V> |
putValues(K key,
List<V> values)
一次插入一个键值
|
List<V> |
putValues(K key,
V... values)
一次插入一个键值
|
V |
removeValue(K key,
int index)
移除某个值
|
boolean |
removeValue(K key,
V value)
移除某个值
|
String |
toString() |
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, values
clone
public void putAllValues(Map<K,V> input)
input
- 键/值(List)的 Map 对象public List<V> putValues(K key, List<V> values)
key
- 键values
- 值的集合@SafeVarargs public final List<V> putValues(K key, V... values)
key
- 键values
- 值的数组public boolean addAllValues(MultiMap<K,V> map)
map
- 键/值(List)的 Map 对象public V removeValue(K key, int index)
key
- 键index
- 值索引位置public boolean removeValue(K key, V value)
key
- 键value
- 值public boolean containsValues(V value)
value
- 值Copyright © 2020 Voovan. All rights reserved.