Package it.unipd.dei.eis.core.utils
Class SynchronizedFrequencyCounter<T>
- java.lang.Object
-
- it.unipd.dei.eis.core.utils.SynchronizedFrequencyCounter<T>
-
- Type Parameters:
T- the type of the object
public class SynchronizedFrequencyCounter<T> extends Object
SynchronizedFrequencyCounter is the class used to count the frequency of an object in a thread-safe way.
-
-
Constructor Summary
Constructors Constructor Description SynchronizedFrequencyCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(T object)The add method is used to add an object to the map.Map<T,Integer>getMapSortedByValueAndKey()The getMapSortedByValueAndKey method is used to sort the map by value and key.
-
-
-
Method Detail
-
add
public void add(T object)
The add method is used to add an object to the map.- Parameters:
object- the object
-
-