|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MultiMap<K,V,C extends Collection<V>>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Method Summary | |
---|---|
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. |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
---|
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 key
boolean contains(Object value)
MultiMap
contain the value in any of its value collections.
value
- the single value to check for
boolean containsValue(Collection<?> value)
MultiMap
contain the Collection as any of its value collections.
value
- the collection to check for
void copyTo(Collection<V> collection)
collection
- to copy all the values to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |