Module develop.toolkit.base
Package develop.toolkit.base.struct
Class AbstractCollectionInMap<K,V,COLLECTION extends Collection<V>>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,COLLECTION>
develop.toolkit.base.struct.AbstractCollectionInMap<K,V,COLLECTION>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,COLLECTION>
public abstract class AbstractCollectionInMap<K,V,COLLECTION extends Collection<V>>
extends LinkedHashMap<K,COLLECTION>
Map里有集合结构
- Author:
- qiushui on 2020-08-13.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidputAllItem(K key, @NonNull Set<V> items) 追加元素final void追加元素final voidremoveIfItem(K key, @NonNull Predicate<? super V> filter) 根据条件删除元素final voidremoveItem(K key, V item) 删除元素Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Field Details
-
supplier
-
-
Constructor Details
-
AbstractCollectionInMap
-
-
Method Details
-
putItem
追加元素- Parameters:
key- map keyitem- 新元素
-
putAllItem
追加元素- Parameters:
key- map keyitems- 新元素
-
removeItem
删除元素- Parameters:
key- map keyitem- 元素
-
removeIfItem
根据条件删除元素- Parameters:
key- map keyfilter- 条件
-