E - the element typepublic interface Multiset<E>
extends java.util.Collection<E>
| Modifier and Type | Method and Description |
|---|---|
void |
add(E element,
int n)
Add n counts of an element.
|
int |
count(java.lang.Object element) |
java.util.Set<E> |
getDistinctElements() |
int |
remove(java.lang.Object element,
int n)
Remove up to n counts of an element.
|
void add(E element, int n)
element - the element to addn - how many to addint remove(java.lang.Object element,
int n)
element - the element the removen - how many to removeint count(java.lang.Object element)
java.util.Set<E> getDistinctElements()