Class MultiMap<K,V>
java.lang.Object
cool.scx.common.multi_map.MultiMap<K,V>
- Type Parameters:
K- KeyV- Value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleanadd(K key, Collection<? extends V> values) booleanbooleanvoidclear()booleancontainsKey(K key) booleancontainsValue(V value) voidforEach(BiConsumer<? super K, V> action) booleanisEmpty()iterator()keys()booleanremove(K key, Collection<? extends V> values) booleanbooleanvoidvoidset(K key, Collection<? extends V> values) longsize()toSingleValueMap(Supplier<Map<K, V>> mapSupplier) toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MultiMap
-
MultiMap
public MultiMap()默认内部 map 使用 HashMap, key 使用 ArrayList
-
-
Method Details
-
add
-
add
-
add
-
add
-
add
-
set
-
set
-
set
-
set
-
set
-
get
-
getAll
-
containsKey
- Specified by:
containsKeyin interfaceIMultiMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceIMultiMap<K,V>
-
remove
-
remove
-
remove
-
removeAll
-
keys
-
values
-
size
-
isEmpty
-
clear
-
toMultiValueMap
-
toSingleValueMap
-
toSingleValueMap
-
forEach
-
iterator
-
toString
-