| Constructor and Description |
|---|
HashMultiset() |
HashMultiset(java.util.Collection<E> source) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element) |
void |
add(E element,
int n)
Add n counts of an element.
|
int |
count(java.lang.Object element) |
java.util.Set<E> |
getDistinctElements() |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object element) |
int |
remove(java.lang.Object element,
int n)
Remove up to n counts of an element.
|
int |
size() |
addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic HashMultiset()
public HashMultiset(java.util.Collection<E> source)
public void add(E element, int n)
Multisetpublic boolean add(E element)
public int remove(java.lang.Object element,
int n)
Multisetpublic boolean remove(java.lang.Object element)
public java.util.Iterator<E> iterator()
public int size()
public java.util.Set<E> getDistinctElements()
getDistinctElements in interface Multiset<E>