public interface CollectionMap<K,V,T extends Collection<V>> extends Map<K,T>, Iterable<Map.Entry<K,T>>
Modifier and Type | Method and Description |
---|---|
<C extends Collection<V>> |
addAllValues(K key,
C collection)
adds everything from the given collection to the internal collection mapped with key
|
void |
clearCollection(K key)
clearCollection the collection mapped with key
|
boolean |
containsValue(K key,
V value)
check the collection map for a key and value combination
|
Collection<T> |
getAllCollections() |
T |
getCollection(K key)
gets a collection mapped with key.
|
T |
getOrCreateCollection(K key)
obtains a collection mapped with key.
|
boolean |
placeMap(Map<K,V> map)
places each value of a map into a collection mapped with the appropriate key
|
boolean |
placeValue(K key,
V value)
places value into a collection mapped with key
|
void |
removeValue(K key,
V value)
removes value from a collection mapped with key
|
Map<K,T> |
toSimpleMap()
Copy of this object as a simple (java.util.Collection) map of Collection
|
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
forEach, iterator, spliterator
Collection<T> getAllCollections()
T getCollection(K key)
key
- key for internal collectionT getOrCreateCollection(K key)
key
- key for internal collectionboolean containsValue(K key, V value)
key
- key for internal collectionvalue
- value to check in internal collectionboolean placeValue(K key, V value)
key
- key for internal collectionvalue
- value to placeValue in internal collectionboolean placeMap(Map<K,V> map)
map
- map to storevoid removeValue(K key, V value)
key
- key for internal collectionvalue
- value to remove from internal collection<C extends Collection<V>> int addAllValues(K key, C collection)
key
- key for internal collectioncollection
- collection of values to place in internal collectionvoid clearCollection(K key)
key
- key for internal collectionCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.