K
- 键类型V
- 值类型public class SetValueMap<K,V> extends AbsCollValueMap<K,V>
DEFAULT_COLLECTION_INITIAL_CAPACITY
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR
Constructor and Description |
---|
SetValueMap()
|
SetValueMap(Map<K,Collection<V>> map)
|
SetValueMap(Supplier<Map<K,Collection<V>>> mapFactory)
基于
mapFactory 创建一个值为Set 的多值映射集合 |
Modifier and Type | Method and Description |
---|---|
protected Set<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 SetValueMap(Supplier<Map<K,Collection<V>>> mapFactory)
mapFactory
创建一个值为Set
的多值映射集合mapFactory
- 创建集合的工厂反方public SetValueMap(Map<K,Collection<V>> map)
map
- 提供数据的原始集合public SetValueMap()
protected Set<V> createCollection()
AbsCollValueMap
createCollection
in class AbsCollValueMap<K,V>
Collection
Copyright © 2025. All rights reserved.