Class HashMultiset<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- net.sourceforge.plantuml.quantization.HashMultiset<E>
-
-
Constructor Summary
Constructors Constructor Description HashMultiset()
HashMultiset(java.util.Collection<E> source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
HashMultiset
public HashMultiset()
-
HashMultiset
public HashMultiset(java.util.Collection<E> source)
-
-
Method Detail
-
add
public void add(E element, int n)
Description copied from interface:Multiset
Add n counts of an element.
-
add
public boolean add(E element)
-
remove
public int remove(java.lang.Object element, int n)
Description copied from interface:Multiset
Remove up to n counts of an element.
-
remove
public boolean remove(java.lang.Object element)
-
iterator
public java.util.Iterator<E> iterator()
-
size
public int size()
-
getDistinctElements
public java.util.Set<E> getDistinctElements()
- Specified by:
getDistinctElements
in interfaceMultiset<E>
-
-