public class CountStatisticImpl extends StatisticImpl implements CountStatistic
DEFAULT_UNIT, DEFAULT_VALUE, NEWLINE| Constructor and Description |
|---|
CountStatisticImpl(long countVal,
String name,
String unit,
String desc,
long sampleTime,
long startTime)
Constructs an immutable instance of CountStatistic with given parameters.
|
CountStatisticImpl(String name)
Constructs an instance of this class with following default values:
Unit is empty string.
|
CountStatisticImpl(String name,
String unit)
Constructs an instance of this class with following default values:
Current Value is StatisticImpl#DEFAULT_VALUE.
|
CountStatisticImpl(String name,
String unit,
long value)
Constructs an instance of this class with following default values:
Description is calculated from the name passed in.
|
CountStatisticImpl(String name,
String unit,
String desc)
Constructs an instance of this class with following default values:
Description is calculated from the name passed in.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
Returns the current value of this statistic.
|
String |
toString() |
getDescription, getLastSampleTime, getName, getStartTime, getUnit, setDescriptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getLastSampleTime, getName, getStartTime, getUnitpublic CountStatisticImpl(String name)
name - String indicating the name of the statisticpublic CountStatisticImpl(String name, String unit)
name - String indicating the name of the statisticunit - String indicating the unit of the statisticpublic CountStatisticImpl(String name, String unit, String desc)
name - String indicating the name of the statisticunit - String indicating the unit of the statisticdesc - A brief description of the statisticpublic CountStatisticImpl(String name, String unit, long value)
name - String indicating the name of the statisticunit - String indicating the unit of the statisticvalue - long indicating the unit of the statisticpublic CountStatisticImpl(long countVal,
String name,
String unit,
String desc,
long sampleTime,
long startTime)
curVal - The current value of this statisticname - The name of the statisticunit - The unit of measurement for this statisticdesc - A brief description of the statisticstartTime - Time in milliseconds at which the measurement was startedsampleTime - Time at which the last measurement was done.public String toString()
toString in class StatisticImplpublic long getCount()
getCount in interface CountStatisticCopyright © 2015. All rights reserved.