Package com.google.common.collect
Class FilteredEntryMultimap.Keys
java.lang.Object
java.util.AbstractCollection<K>
com.google.common.collect.AbstractMultiset<K>
com.google.common.collect.Multimaps.Keys<K,V>
com.google.common.collect.FilteredEntryMultimap.Keys
- All Implemented Interfaces:
Multiset<K>
,Iterable<K>
,Collection<K>
- Enclosing class:
FilteredEntryMultimap<K,
V>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.AbstractMultiset
AbstractMultiset.ElementSet, AbstractMultiset.EntrySet
Nested classes/interfaces inherited from interface com.google.common.collect.Multiset
Multiset.Entry<E>
-
Field Summary
Fields inherited from class com.google.common.collect.Multimaps.Keys
multimap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentrySet()
Returns a view of the contents of this multiset, grouped intoMultiset.Entry
instances, each providing an element of the multiset and the count of that element.int
Removes a number of occurrences of the specified element from this multiset.Methods inherited from class com.google.common.collect.Multimaps.Keys
clear, contains, count, distinctElements, elementIterator, elementSet, entryIterator, forEach, iterator, size, spliterator
Methods inherited from class com.google.common.collect.AbstractMultiset
add, add, addAll, createElementSet, createEntrySet, equals, hashCode, isEmpty, remove, removeAll, retainAll, setCount, setCount, toString
Methods inherited from class java.util.AbstractCollection
containsAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray, toArray, toArray
Methods inherited from interface com.google.common.collect.Multiset
containsAll, forEachEntry
-
Constructor Details
-
Keys
Keys()
-
-
Method Details
-
remove
Description copied from interface:Multiset
Removes a number of occurrences of the specified element from this multiset. If the multiset contains fewer than this number of occurrences to begin with, all occurrences will be removed. Note that ifoccurrences == 1
, this is functionally equivalent to the callremove(element)
.- Specified by:
remove
in interfaceMultiset<K>
- Overrides:
remove
in classMultimaps.Keys<K,
V> - Parameters:
key
- the element to conditionally remove occurrences ofoccurrences
- the number of occurrences of the element to remove. May be zero, in which case no change will be made.- Returns:
- the count of the element before the operation; possibly zero
-
entrySet
Description copied from interface:Multiset
Returns a view of the contents of this multiset, grouped intoMultiset.Entry
instances, each providing an element of the multiset and the count of that element. This set contains exactly one entry for each distinct element in the multiset (thus it always has the same size as theMultiset.elementSet()
). The order of the elements in the element set is unspecified.The entry set is backed by the same data as the multiset, so any change to either is immediately reflected in the other. However, multiset changes may or may not be reflected in any
Entry
instances already retrieved from the entry set (this is implementation-dependent). Furthermore, implementations are not required to support modifications to the entry set at all, and theEntry
instances themselves don't even have methods for modification. See the specific implementation class for more details on how its entry set handles modifications.
-