public interface MultiMap<K,V,C extends Collection<V>> extends Map<K,C>
Modifier and Type | Method and Description |
---|---|
C |
allValues()
Get all elements in all Collections.
|
boolean |
contains(Object value)
Does this
MultiMap contain the value in any of its value collections. |
boolean |
containsValue(Collection<?> value)
Does this
MultiMap contain the Collection as any of its value collections. |
void |
copyTo(Collection<V> collection)
Copy all values to the supplied collection.
|
boolean |
putSingle(K key,
V value)
Put a single value in to the appropriate mapped collection.
|
int |
sizeAll()
The sum of sizes of all contained keys.
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
C allValues()
MultiMap
contains lists
then there will be the same number
of elements as sizeAll()
, whereas if the MultiMap
contains sets
then duplicates may be removed. If a different type of Collection
The returned Collection is immutable.
int sizeAll()
Map.size()
on the
result of allValues()
boolean putSingle(K key, V value)
key
- the Keyvalue
- the single value to add to the collection for this keyboolean contains(Object value)
MultiMap
contain the value in any of its value collections.value
- the single value to check forboolean containsValue(Collection<?> value)
MultiMap
contain the Collection as any of its value collections.value
- the collection to check forvoid copyTo(Collection<V> collection)
collection
- to copy all the values to.Copyright © 2002-2016 Atlassian. All Rights Reserved.