K
- 键类型V
- 值类型public class ListValueMap<K,V> extends AbsCollValueMap<K,V>
DEFAULT_COLLECTION_INITIAL_CAPACITY
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR
Constructor and Description |
---|
ListValueMap()
|
ListValueMap(Map<K,Collection<V>> map)
基于指定Map创建一个值为
List 的多值映射集合 |
ListValueMap(Supplier<Map<K,Collection<V>>> mapFactory)
基于
mapFactory 创建一个值为List 的多值映射集合 |
Modifier and Type | Method and Description |
---|---|
protected List<V> |
createCollection()
创建集合
此方法用于创建在putValue后追加值所在的集合,子类实现此方法创建不同类型的集合 |
filterAllValues, putAllValues, putValue, removeAllValues, removeValue, replaceAllValues
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, getRaw, hashCode, isEmpty, iterator, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
allForEach, allValues, filterAllValues, getValue, getValues, put, putAll, putAllValues, putValues, removeValues, replaceAllValues, size
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
forEach, spliterator
public ListValueMap(Supplier<Map<K,Collection<V>>> mapFactory)
mapFactory
创建一个值为List
的多值映射集合mapFactory
- 创建集合的工厂反方public ListValueMap(Map<K,Collection<V>> map)
List
的多值映射集合map
- 提供数据的原始集合public ListValueMap()
protected List<V> createCollection()
AbsCollValueMap
createCollection
in class AbsCollValueMap<K,V>
Collection
Copyright © 2025. All rights reserved.