Package com.google.common.collect
Class FilteredEntryMultimap.Keys
java.lang.Object
java.util.AbstractCollection<E>
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.EntrySetNested 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.Entryinstances, each providing an element of the multiset and the count of that element.intRemoves 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, spliteratorMethods inherited from class com.google.common.collect.AbstractMultiset
add, add, addAll, createElementSet, createEntrySet, equals, hashCode, isEmpty, remove, removeAll, retainAll, setCount, setCount, toStringMethods inherited from class java.util.AbstractCollection
containsAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray, toArray, toArrayMethods inherited from interface com.google.common.collect.Multiset
containsAll, forEachEntry
-
Constructor Details
-
Keys
Keys()
-
-
Method Details
-
remove
Description copied from interface:MultisetRemoves 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:
removein interfaceMultiset<K>- Overrides:
removein 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:MultisetReturns a view of the contents of this multiset, grouped intoMultiset.Entryinstances, 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
Entryinstances 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 theEntryinstances themselves don't even have methods for modification. See the specific implementation class for more details on how its entry set handles modifications.
-