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 voidadd(T element)Add the element to the multisetvoidadd(T element, long add)Add the element to the multisetvoidclear()Remove all the elements.longcount(T element)Count the elements in multisetCollection<Map.Entry<T,Long>>entrySet()Get all associations of the multiset.booleanequals(Object o)inthashCode()booleanisEmpty()Answers if Multiset is emptyCollection<T>keys()Answers the collection of keyslongsize()Answers the size of multiset.
-
-
-
Method Detail
-
add
public void add(T element)
Description copied from interface:MultisetAdd the element to the multiset
-
add
public void add(T element, long add)
Description copied from interface:MultisetAdd the element to the multiset
-
count
public long count(T element)
Description copied from interface:MultisetCount the elements in multiset
-
entrySet
public Collection<Map.Entry<T,Long>> entrySet()
Description copied from interface:MultisetGet all associations of the multiset. Each entry provides a key and a count of that element.
-
isEmpty
public boolean isEmpty()
Description copied from interface:MultisetAnswers if Multiset is empty
-
size
public long size()
Description copied from interface:MultisetAnswers the size of multiset. Equivalent to number of elements, counting duplications.
-
keys
public Collection<T> keys()
Description copied from interface:MultisetAnswers the collection of keys
-
-