Interface Multiset<E>
- Type Parameters:
E
- the element type
- All Superinterfaces:
Collection<E>
,Iterable<E>
- All Known Implementing Classes:
HashMultiset
A collection which permits duplicates, and provides methods adding/removing
several counts of an element.
-
Method Details
-
add
Add n counts of an element.- Parameters:
element
- the element to addn
- how many to add
-
remove
Remove up to n counts of an element.- Parameters:
element
- the element the removen
- how many to remove- Returns:
- the number of elements removed
-
count
-
getDistinctElements
-