Package com.google.common.collect
Class FilteredEntryMultimap<K,V>
java.lang.Object
com.google.common.collect.AbstractMultimap<K,V>
com.google.common.collect.FilteredEntryMultimap<K,V>
- All Implemented Interfaces:
FilteredMultimap<K,,V> Multimap<K,V>
- Direct Known Subclasses:
FilteredEntrySetMultimap
Implementation of
Multimaps.filterEntries(Multimap, Predicate).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class(package private) final classNested classes/interfaces inherited from class com.google.common.collect.AbstractMultimap
AbstractMultimap.Entries, AbstractMultimap.EntrySet, AbstractMultimap.Values -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all key-value pairs from the multimap, leaving it empty.booleancontainsKey(Object key) Returnstrueif this multimap contains at least one key-value pair with the keykey.(package private) Map<K,Collection<V>> (package private) Collection<Map.Entry<K,V>> (package private) Collection<V>(package private) static <E> Collection<E>filterCollection(Collection<E> collection, Predicate<? super E> predicate) Returns a view collection of the values associated withkeyin this multimap, if any.Removes all values associated with the keykey.(package private) booleanremoveEntriesIf(Predicate<? super Map.Entry<K, Collection<V>>> predicate) private booleanintsize()Returns the number of key-value pairs in this multimap.(package private) Collection<V>Methods inherited from class com.google.common.collect.AbstractMultimap
asMap, containsEntry, containsValue, entries, entrySpliterator, equals, hashCode, isEmpty, keys, keySet, put, putAll, putAll, remove, replaceValues, toString, valueIterator, values, valueSpliterator
-
Field Details
-
unfiltered
-
predicate
-
-
Constructor Details
-
FilteredEntryMultimap
-
-
Method Details
-
unfiltered
- Specified by:
unfilteredin interfaceFilteredMultimap<K,V>
-
entryPredicate
- Specified by:
entryPredicatein interfaceFilteredMultimap<K,V>
-
size
public int size()Description copied from interface:MultimapReturns the number of key-value pairs in this multimap.Note: this method does not return the number of distinct keys in the multimap, which is given by
keySet().size()orasMap().size(). See the opening section of theMultimapclass documentation for clarification. -
satisfies
-
filterCollection
-
containsKey
Description copied from interface:MultimapReturnstrueif this multimap contains at least one key-value pair with the keykey.- Specified by:
containsKeyin interfaceMultimap<K,V>
-
removeAll
Description copied from interface:MultimapRemoves all values associated with the keykey.Once this method returns,
keywill not be mapped to any values, so it will not appear inMultimap.keySet(),Multimap.asMap(), or any other views. -
unmodifiableEmptyCollection
Collection<V> unmodifiableEmptyCollection() -
clear
public void clear()Description copied from interface:MultimapRemoves all key-value pairs from the multimap, leaving it empty. -
get
Description copied from interface:MultimapReturns a view collection of the values associated withkeyin this multimap, if any. Note that whencontainsKey(key)is false, this returns an empty collection, notnull.Changes to the returned collection will update the underlying multimap, and vice versa.
-
createEntries
Collection<Map.Entry<K,V>> createEntries()- Specified by:
createEntriesin classAbstractMultimap<K,V>
-
createValues
Collection<V> createValues()- Specified by:
createValuesin classAbstractMultimap<K,V>
-
entryIterator
- Specified by:
entryIteratorin classAbstractMultimap<K,V>
-
createAsMap
Map<K,Collection<V>> createAsMap()- Specified by:
createAsMapin classAbstractMultimap<K,V>
-
createKeySet
- Specified by:
createKeySetin classAbstractMultimap<K,V>
-
removeEntriesIf
-
createKeys
- Specified by:
createKeysin classAbstractMultimap<K,V>
-