Package com.helger.commons.statistics
Class AbstractStatisticsHandlerKeyedNumeric
java.lang.Object
com.helger.commons.statistics.AbstractStatisticsHandlerKeyedNumeric
- All Implemented Interfaces:
IStatisticsHandler,IStatisticsHandlerKeyed,IStatisticsHandlerKeyedNumeric
- Direct Known Subclasses:
StatisticsHandlerKeyedSize,StatisticsHandlerKeyedTimer
@ThreadSafe
public abstract class AbstractStatisticsHandlerKeyedNumeric
extends Object
implements IStatisticsHandlerKeyedNumeric
Abstract base class for a keyed numeric statistic handler
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidfinal longgetAverage(String sKey) final intfinal intgetInvocationCount(String sKey) Get the invocation count for a single key.longfinal longfinal BigInteger
-
Constructor Details
-
AbstractStatisticsHandlerKeyedNumeric
public AbstractStatisticsHandlerKeyedNumeric()
-
-
Method Details
-
getInvocationCount
- Specified by:
getInvocationCountin interfaceIStatisticsHandler- Returns:
- The number of times this statistics hander was invoked.
-
getAllKeys
- Specified by:
getAllKeysin interfaceIStatisticsHandlerKeyed- Returns:
- A collection of all keys that have a value assigned. Never
null.
-
addValue
-
getInvocationCount
Description copied from interface:IStatisticsHandlerKeyedGet the invocation count for a single key.- Specified by:
getInvocationCountin interfaceIStatisticsHandlerKeyed- Parameters:
sKey- The key to be queried. May benull.- Returns:
- The invocation count for a single key or
CGlobal.ILLEGAL_UINTif no such key exists
-
getSum
- Specified by:
getSumin interfaceIStatisticsHandlerKeyedNumeric- Parameters:
sKey- The key to be queried.- Returns:
- The sum of aggregated values.
nullif no such key exists.
-
getMin
- Specified by:
getMinin interfaceIStatisticsHandlerKeyedNumeric- Parameters:
sKey- The key to be queried.- Returns:
- The smallest value. Returns
CGlobal.ILLEGAL_ULONGif no such key exists.
-
getAverage
- Specified by:
getAveragein interfaceIStatisticsHandlerKeyedNumeric- Parameters:
sKey- The key to be queried.- Returns:
- The average value (=sum/invocationCount). Returns
CGlobal.ILLEGAL_ULONGif no such key exists.
-
getMax
- Specified by:
getMaxin interfaceIStatisticsHandlerKeyedNumeric- Parameters:
sKey- The key to be queried.- Returns:
- The biggest value. Returns
CGlobal.ILLEGAL_ULONGif no such key exists.
-