private abstract static class Multisets.ViewMultiset<E> extends AbstractMultiset<E>
AbstractMultiset with additional default implementations, some of them linear-time
implementations in terms of elementSet and entrySet.AbstractMultiset.ElementSet, AbstractMultiset.EntrySetMultiset.Entry<E>| Modifier | Constructor and Description |
|---|---|
private |
ViewMultiset() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
(package private) int |
distinctElements() |
java.util.Iterator<E> |
iterator() |
int |
size()
Returns the total number of all occurrences of all elements in this multiset.
|
add, add, addAll, contains, createElementSet, createEntrySet, elementIterator, elementSet, entryIterator, entrySet, equals, hashCode, isEmpty, remove, remove, removeAll, retainAll, setCount, setCount, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, count, forEach, forEachEntry, spliteratorpublic int size()
MultisetNote: this method does not return the number of distinct elements in the
multiset, which is given by entrySet().size().
public void clear()
clear in interface java.util.Collection<E>clear in class AbstractMultiset<E>public java.util.Iterator<E> iterator()
MultisetElements that occur multiple times in the multiset will appear multiple times in this iterator, though not necessarily sequentially.
int distinctElements()
distinctElements in class AbstractMultiset<E>