K
- 键类型V
- 值类型public class CollectionValueMap<K,V> extends AbsCollValueMap<K,V,Collection<V>>
DEFAULT_COLLECTION_INITIAL_CAPACITY
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR
Constructor and Description |
---|
CollectionValueMap()
构造
|
CollectionValueMap(float loadFactor,
Map<? extends K,? extends Collection<V>> m)
构造
|
CollectionValueMap(float loadFactor,
Map<? extends K,? extends Collection<V>> m,
Func0<Collection<V>> collectionCreateFunc)
构造
|
CollectionValueMap(int initialCapacity)
构造
|
CollectionValueMap(int initialCapacity,
float loadFactor)
构造
|
CollectionValueMap(int initialCapacity,
float loadFactor,
Func0<Collection<V>> collectionCreateFunc)
构造
|
CollectionValueMap(Map<? extends K,? extends Collection<V>> m)
构造
|
Modifier and Type | Method and Description |
---|---|
protected Collection<V> |
createCollection()
创建集合
此方法用于创建在putValue后追加值所在的集合,子类实现此方法创建不同类型的集合 |
get, putAllValues, putValue, removeValue, removeValues
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
forEach, spliterator
public CollectionValueMap()
public CollectionValueMap(int initialCapacity)
initialCapacity
- 初始大小public CollectionValueMap(Map<? extends K,? extends Collection<V>> m)
m
- Mappublic CollectionValueMap(float loadFactor, Map<? extends K,? extends Collection<V>> m)
loadFactor
- 加载因子m
- Mappublic CollectionValueMap(int initialCapacity, float loadFactor)
initialCapacity
- 初始大小loadFactor
- 加载因子public CollectionValueMap(float loadFactor, Map<? extends K,? extends Collection<V>> m, Func0<Collection<V>> collectionCreateFunc)
loadFactor
- 加载因子m
- MapcollectionCreateFunc
- Map中值的集合创建函数public CollectionValueMap(int initialCapacity, float loadFactor, Func0<Collection<V>> collectionCreateFunc)
initialCapacity
- 初始大小loadFactor
- 加载因子collectionCreateFunc
- Map中值的集合创建函数protected Collection<V> createCollection()
AbsCollValueMap
createCollection
in class AbsCollValueMap<K,V,Collection<V>>
Collection
Copyright © 2024. All rights reserved.