Class SetValueMap<K,V>
java.lang.Object
org.miaixz.bus.core.center.map.MapWrapper<K,Collection<V>>
org.miaixz.bus.core.center.map.multi.AbstractCollValueMap<K,V>
org.miaixz.bus.core.center.map.multi.SetValueMap<K,V>
- Type Parameters:
K- 键类型V- 值类型
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Map.Entry<K,,Collection<V>>> Map<K,,Collection<V>> MultiValueMap<K,,V> Wrapper<Map<K,Collection<V>>>
- Direct Known Subclasses:
Graph
值作为集合Set(LinkedHashSet)的Map实现,通过调用putValue可以在相同key时加入多个值,多个值用集合表示
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.miaixz.bus.core.center.map.multi.AbstractCollValueMap
DEFAULT_COLLECTION_INITIAL_CAPACITY -
Constructor Summary
ConstructorsConstructorDescriptionSetValueMap(Supplier<Map<K, Collection<V>>> mapFactory) 基于mapFactory创建一个值为Set的多值映射集合SetValueMap(Map<K, Collection<V>> map) -
Method Summary
Modifier and TypeMethodDescription创建集合 此方法用于创建在putValue后追加值所在的集合,子类实现此方法创建不同类型的集合Methods inherited from class org.miaixz.bus.core.center.map.multi.AbstractCollValueMap
filterAllValues, putAllValues, putValue, removeAllValues, removeValue, replaceAllValuesMethods inherited from class org.miaixz.bus.core.center.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, spliteratorMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface org.miaixz.bus.core.center.map.multi.MultiValueMap
allForEach, allValues, filterAllValues, getValue, getValues, put, putAll, putAllValues, putValues, removeValues, replaceAllValues, size
-
Constructor Details
-
SetValueMap
基于mapFactory创建一个值为Set的多值映射集合- Parameters:
mapFactory- 创建集合的工厂反方
-
SetValueMap
- Parameters:
map- 提供数据的原始集合
-
SetValueMap
public SetValueMap()
-
-
Method Details
-
createCollection
Description copied from class:AbstractCollValueMap创建集合 此方法用于创建在putValue后追加值所在的集合,子类实现此方法创建不同类型的集合- Specified by:
createCollectionin classAbstractCollValueMap<K,V> - Returns:
Collection
-