K
- the key typeV
- the value typeC
- the collection typepublic abstract class AbstractDelegatingMultiMap<K,V,C extends Collection<V>> extends Object implements MultiMap<K,V,C>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
AbstractDelegatingMultiMap() |
Modifier and Type | Method and Description |
---|---|
C |
add(K key,
V value)
Adds the specified value to the key.
|
C |
addAll(K key,
Collection<? extends V> values)
Adds the specified values to the key.
|
C |
allValues() |
void |
clear() |
boolean |
containsCollectionValue(V v)
Checks if any collection of any key contains
v . |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,C>> |
entrySet() |
boolean |
equals(Object o) |
C |
get(Object key) |
protected abstract Map<K,C> |
getDelegate() |
int |
hashCode() |
boolean |
hasValues(K key)
Checks if the specified key is contained in this map and if the
associated collection is not empty.
|
boolean |
isEmpty() |
Set<K> |
keySet() |
protected abstract C |
newCollection() |
C |
put(K key,
C value) |
void |
putAll(Map<? extends K,? extends C> m) |
boolean |
remove(K key,
Iterable<V> value)
Removes the values of the collection for the specified key (if it
exists).
|
C |
remove(Object key) |
boolean |
remove(Object k,
Object v)
Removes the value of the collection for the specified key (if it exists).
|
boolean |
removeWithKey(K key,
Iterable<V> value)
Removes the specified values of the collection for the specified key (if
it exists).
|
boolean |
removeWithKey(K key,
V value)
Removes the specified value of the collection for the specified key (if
it exists).
|
int |
size() |
Collection<C> |
values() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, replace, replace, replaceAll
private static final long serialVersionUID
public boolean containsKey(Object key)
containsKey
in interface Map<K,C extends Collection<V>>
public boolean containsValue(Object value)
containsValue
in interface Map<K,C extends Collection<V>>
public C add(K key, V value)
MultiMap
null
it will be created.public boolean remove(Object k, Object v)
MultiMap
public Collection<C> values()
public C allValues()
public boolean equals(Object o)
public int hashCode()
public boolean containsCollectionValue(V v)
MultiMap
v
.containsCollectionValue
in interface MultiMap<K,V,C extends Collection<V>>
v
- the element to checkpublic boolean remove(K key, Iterable<V> value)
MultiMap
public boolean hasValues(K key)
MultiMap
public C addAll(K key, Collection<? extends V> values)
MultiMap
null
it will be created.public boolean removeWithKey(K key, V value)
MultiMap
removeWithKey
in interface MultiMap<K,V,C extends Collection<V>>
key
- the keyvalue
- the valuepublic boolean removeWithKey(K key, Iterable<V> value)
MultiMap
removeWithKey
in interface MultiMap<K,V,C extends Collection<V>>
key
- the keyvalue
- the valueprotected abstract C newCollection()
Copyright © 2012-2015 52north.org. All Rights Reserved.