@GwtCompatible public abstract class ForwardingSetMultimap<K,V> extends ForwardingMultimap<K,V> implements SetMultimap<K,V>
Constructor and Description |
---|
ForwardingSetMultimap() |
Modifier and Type | Method and Description |
---|---|
protected abstract SetMultimap<K,V> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
Set<Map.Entry<K,V>> |
entries()
Returns a collection of all key-value pairs.
|
Set<V> |
get(K key)
Returns a collection view containing the values associated with
key
in this multimap, if any. |
Set<V> |
removeAll(Object key)
Removes all values associated with a given key.
|
Set<V> |
replaceValues(K key,
Iterable<? extends V> values)
Stores a collection of values with the same key, replacing any existing
values for that key.
|
asMap, clear, containsEntry, containsKey, containsValue, equals, hashCode, isEmpty, keys, keySet, put, putAll, putAll, remove, size, values
toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asMap, equals
clear, containsEntry, containsKey, containsValue, hashCode, isEmpty, keys, keySet, put, putAll, putAll, remove, size, values
public ForwardingSetMultimap()
protected abstract SetMultimap<K,V> delegate()
ForwardingObject
ForwardingSet.delegate()
. Concrete subclasses override this method to supply
the instance being decorated.delegate
in class ForwardingMultimap<K,V>
public Set<Map.Entry<K,V>> entries()
Multimap
add
or addAll
operations.public Set<V> get(@Nullable K key)
Multimap
key
in this multimap, if any. Note that even when (containsKey(key)
is
false, get(key)
still returns an empty collection, not null
.
Changes to the returned collection will update the underlying multimap, and vice versa.
public Set<V> removeAll(@Nullable Object key)
Multimap
removeAll
in interface Multimap<K,V>
removeAll
in interface SetMultimap<K,V>
removeAll
in class ForwardingMultimap<K,V>
key
- key of entries to remove from the multimappublic Set<V> replaceValues(K key, Iterable<? extends V> values)
Multimap
replaceValues
in interface Multimap<K,V>
replaceValues
in interface SetMultimap<K,V>
replaceValues
in class ForwardingMultimap<K,V>
key
- key to store in the multimapvalues
- values to store in the multimapCopyright © 2010-2013. All Rights Reserved.