Package com.helger.commons.statistics
Class StatisticsHandlerCounter
- java.lang.Object
-
- com.helger.commons.statistics.StatisticsHandlerCounter
-
- All Implemented Interfaces:
IMutableStatisticsHandlerCounter,IStatisticsHandler,IStatisticsHandlerCounter
@ThreadSafe public class StatisticsHandlerCounter extends Object implements IMutableStatisticsHandlerCounter
Default implementation ofIMutableStatisticsHandlerCounter- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description StatisticsHandlerCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCount()intgetInvocationCount()voidincrement(long nByHowMany)Increment the counter by an arbitrary number-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.helger.commons.statistics.IMutableStatisticsHandlerCounter
increment
-
-
-
-
Method Detail
-
getInvocationCount
@Nonnegative public int getInvocationCount()
- Specified by:
getInvocationCountin interfaceIStatisticsHandler- Returns:
- The number of times this statistics hander was invoked.
-
getCount
@CheckForSigned public long getCount()
- Specified by:
getCountin interfaceIStatisticsHandlerCounter- Returns:
- The total count. May be negative if negative values were added.
-
increment
public void increment(long nByHowMany)
Description copied from interface:IMutableStatisticsHandlerCounterIncrement the counter by an arbitrary number- Specified by:
incrementin interfaceIMutableStatisticsHandlerCounter- Parameters:
nByHowMany- The number to be added. May be negative as well.
-
-