final class FilteredEntrySetMultimap<K,V> extends FilteredEntryMultimap<K,V> implements FilteredSetMultimap<K,V>
Multimaps.filterEntries(SetMultimap, Predicate).FilteredEntryMultimap.AsMap, FilteredEntryMultimap.Keys, FilteredEntryMultimap.ValuePredicateAbstractMultimap.Entries, AbstractMultimap.EntrySet, AbstractMultimap.Valuespredicate, unfiltered| Constructor and Description |
|---|
FilteredEntrySetMultimap(SetMultimap<K,V> unfiltered,
Predicate<? super java.util.Map.Entry<K,V>> predicate) |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.util.Set<java.util.Map.Entry<K,V>> |
createEntries() |
java.util.Set<java.util.Map.Entry<K,V>> |
entries()
Returns a view collection of all key-value pairs contained in this multimap, as
Map.Entry
instances. |
java.util.Set<V> |
get(K key)
Returns a view collection of the values associated with
key in this multimap, if any. |
java.util.Set<V> |
removeAll(java.lang.Object key)
Removes all values associated with the key
key. |
java.util.Set<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.
|
SetMultimap<K,V> |
unfiltered() |
clear, containsKey, createAsMap, createKeys, createKeySet, createValues, entryIterator, entryPredicate, filterCollection, removeEntriesIf, size, unmodifiableEmptyCollectionasMap, containsEntry, containsValue, entrySpliterator, equals, hashCode, isEmpty, keys, keySet, put, putAll, putAll, remove, toString, valueIterator, values, valueSpliteratorclone, finalize, getClass, notify, notifyAll, wait, wait, waitentryPredicateasMap, equalspublic SetMultimap<K,V> unfiltered()
unfiltered in interface FilteredMultimap<K,V>unfiltered in interface FilteredSetMultimap<K,V>unfiltered in class FilteredEntryMultimap<K,V>public java.util.Set<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.Set<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 Multimap<K,V>removeAll in interface SetMultimap<K,V>removeAll in class FilteredEntryMultimap<K,V>public java.util.Set<V> replaceValues(K key, java.lang.Iterable<? extends V> values)
MultimapIf values is empty, this is equivalent to removeAll(key).
replaceValues in interface Multimap<K,V>replaceValues in interface SetMultimap<K,V>replaceValues in class AbstractMultimap<K,V>java.util.Set<java.util.Map.Entry<K,V>> createEntries()
createEntries in class FilteredEntryMultimap<K,V>public java.util.Set<java.util.Map.Entry<K,V>> entries()
MultimapMap.Entry
instances.
Changes to the returned collection or the entries it contains will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible.