private static class Multimaps.UnmodifiableListMultimap<K,V> extends Multimaps.UnmodifiableMultimap<K,V> implements ListMultimap<K,V>
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
UnmodifiableListMultimap(ListMultimap<K,V> delegate) |
| Modifier and Type | Method and Description |
|---|---|
ListMultimap<K,V> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
java.util.List<V> |
get(K key)
Returns a view collection of the values associated with
key in this multimap, if any. |
java.util.List<V> |
removeAll(java.lang.Object key)
Removes all values associated with the key
key. |
java.util.List<V> |
replaceValues(K key,
java.lang.Iterable<? extends V> values)
Stores a collection of values with the same key, replacing any existing values for that key.
|
asMap, clear, entries, forEach, keys, keySet, put, putAll, putAll, remove, valuescontainsEntry, containsKey, containsValue, equals, hashCode, isEmpty, sizetoStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasMap, equalsprivate static final long serialVersionUID
UnmodifiableListMultimap(ListMultimap<K,V> delegate)
public ListMultimap<K,V> delegate()
ForwardingObjectForwardingSet.delegate(). Concrete subclasses override this method to supply the
instance being decorated.delegate in class Multimaps.UnmodifiableMultimap<K,V>public java.util.List<V> get(K key)
Multimapkey in this multimap, if any.
Note that when containsKey(key) is false, this returns an empty collection, not null.
Changes to the returned collection will update the underlying multimap, and vice versa.
public java.util.List<V> removeAll(@CheckForNull java.lang.Object key)
Multimapkey.
Once this method returns, key will not be mapped to any values, so it will not
appear in Multimap.keySet(), Multimap.asMap(), or any other views.
removeAll in interface ListMultimap<K,V>removeAll in interface Multimap<K,V>removeAll in class Multimaps.UnmodifiableMultimap<K,V>public java.util.List<V> replaceValues(K key, java.lang.Iterable<? extends V> values)
MultimapIf values is empty, this is equivalent to removeAll(key).
replaceValues in interface ListMultimap<K,V>replaceValues in interface Multimap<K,V>replaceValues in class Multimaps.UnmodifiableMultimap<K,V>