Package org.openjdk.jmh.util
Class DelegatingMultiset<T>
- java.lang.Object
-
- org.openjdk.jmh.util.DelegatingMultiset<T>
-
- All Implemented Interfaces:
Serializable
,Multiset<T>
- Direct Known Subclasses:
HashMultiset
,TreeMultiset
public class DelegatingMultiset<T> extends Object implements Multiset<T>, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DelegatingMultiset(Map<T,Long> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(T element)
Add the element to the multisetvoid
add(T element, long add)
Add the element to the multisetlong
count(T element)
Count the elements in multisetCollection<Map.Entry<T,Long>>
entrySet()
Get all associations of the multiset.boolean
equals(Object o)
int
hashCode()
boolean
isEmpty()
Answers if Multiset is emptyCollection<T>
keys()
Answers the collection of keyslong
size()
Answers the size of multiset.
-
-
-
Method Detail
-
add
public void add(T element)
Description copied from interface:Multiset
Add the element to the multiset
-
add
public void add(T element, long add)
Description copied from interface:Multiset
Add the element to the multiset
-
count
public long count(T element)
Description copied from interface:Multiset
Count the elements in multiset
-
entrySet
public Collection<Map.Entry<T,Long>> entrySet()
Description copied from interface:Multiset
Get all associations of the multiset. Each entry provides a key and a count of that element.
-
isEmpty
public boolean isEmpty()
Description copied from interface:Multiset
Answers if Multiset is empty
-
size
public long size()
Description copied from interface:Multiset
Answers the size of multiset. Equivalent to number of elements, counting duplications.
-
keys
public Collection<T> keys()
Description copied from interface:Multiset
Answers the collection of keys
-
-