Package org.aoju.bus.core.map
Class ListValueMap<K,V>
java.lang.Object
org.aoju.bus.core.map.MapWrapper<K,C>
org.aoju.bus.core.map.AbstractCollValueMap<K,V,List<V>>
org.aoju.bus.core.map.ListValueMap<K,V>
- Type Parameters:
K- 键类型V- 值类型
值作为集合List的Map实现,通过调用putValue可以在相同key时加入多个值,多个值用集合表示
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.aoju.bus.core.map.AbstractCollValueMap
DEFAULT_COLLECTION_INITIAL_CAPACITYFields inherited from class org.aoju.bus.core.map.MapWrapper
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR -
Constructor Summary
ConstructorsConstructorDescription构造ListValueMap(float loadFactor, Map<? extends K, ? extends Collection<V>> m) 构造ListValueMap(int initialCapacity) 构造ListValueMap(int initialCapacity, float loadFactor) 构造ListValueMap(Map<? extends K, ? extends Collection<V>> m) 构造 -
Method Summary
Modifier and TypeMethodDescription创建集合 此方法用于创建在putValue后追加值所在的集合,子类实现此方法创建不同类型的集合Methods inherited from class org.aoju.bus.core.map.AbstractCollValueMap
get, putAllValues, putValueMethods inherited from class org.aoju.bus.core.map.MapWrapper
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, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ListValueMap
public ListValueMap()构造 -
ListValueMap
public ListValueMap(int initialCapacity) 构造- Parameters:
initialCapacity- 初始大小
-
ListValueMap
构造- Parameters:
m- Map
-
ListValueMap
构造- Parameters:
loadFactor- 加载因子m- Map
-
ListValueMap
public ListValueMap(int initialCapacity, float loadFactor) 构造- Parameters:
initialCapacity- 初始大小loadFactor- 加载因子
-
-
Method Details
-
createCollection
Description copied from class:AbstractCollValueMap创建集合 此方法用于创建在putValue后追加值所在的集合,子类实现此方法创建不同类型的集合- Specified by:
createCollectionin classAbstractCollValueMap<K,V, List<V>> - Returns:
Collection
-