public interface CollectionMap<K,V,T extends java.util.Collection<V>>
extends java.util.Map<K,T>, java.lang.Iterable<java.util.Map.Entry<K,T>>
Modifier and Type | Method and Description |
---|---|
<C extends java.util.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
|
java.util.Collection<T> |
getAllCollections() |
T |
getCollection(K key)
gets a collection mapped with key.
|
T |
obtainCollection(K key)
obtains a collection mapped with key.
|
boolean |
placeMap(java.util.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
|
java.util.Map<K,T> |
toSimpleMap()
Copy of this object as a simple (java.util.Collection) map of Collection
|
java.util.Collection<T> getAllCollections()
T getCollection(K key)
key
- key for internal collectionT obtainCollection(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(java.util.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 java.util.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 collection