Package com.gengoai.collection.counter
Class ConcurrentHashMapCounter<T>
- java.lang.Object
-
- com.gengoai.collection.counter.BaseMapCounter<T>
-
- com.gengoai.collection.counter.ConcurrentHashMapCounter<T>
-
- Type Parameters:
T
- the component type of the counter
- All Implemented Interfaces:
Counter<T>
,Copyable<Counter<T>>
,Serializable
public class ConcurrentHashMapCounter<T> extends BaseMapCounter<T>
Implementation of a Counter using a ConcurrentHashMap- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConcurrentHashMapCounter()
Instantiates a new Concurrent hash map counter.ConcurrentHashMapCounter(@NonNull Map<T,Double> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <R> Counter<R>
newInstance()
New instance counter.-
Methods inherited from class com.gengoai.collection.counter.BaseMapCounter
adjustValues, adjustValuesSelf, asMap, bottomN, clear, contains, copy, divideBySum, entries, filterByKey, filterByValue, get, increment, isEmpty, items, itemsByCount, mapKeys, merge, merge, remove, removeAll, set, size, sum, topN, toString, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.gengoai.collection.counter.Counter
average, decrement, decrement, decrementAll, decrementAll, forEach, increment, incrementAll, incrementAll, magnitude, max, maximumCount, min, minimumCount, sample, sample, standardDeviation, writeCsv
-
-
-
-
Method Detail
-
newInstance
protected <R> Counter<R> newInstance()
Description copied from class:BaseMapCounter
New instance counter.- Specified by:
newInstance
in classBaseMapCounter<T>
- Type Parameters:
R
- the type parameter- Returns:
- the counter
-
-