public class MutableCountStatisticImpl extends Object implements CountStatistic, MutableCountStatistic
for an immutable implementation,
Serialized Form| Constructor and Description |
|---|
MutableCountStatisticImpl(CountStatistic initial)
Constructs an instance of MutableCountStatistic that encapsulates the given Statistic.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
The count since the last reset.
|
String |
getDescription()
A human-readable description of the Statistic.
|
long |
getLastSampleTime()
The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
|
String |
getName()
The name of this Statistic.
|
long |
getStartTime()
The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
|
String |
getUnit()
The unit of measurement for this Statistic.
|
Statistic |
modifiableView()
Returns an instance of Statistic whose state can be changed by the caller.
|
void |
reset()
Resets to the initial state.
|
void |
setCount(long count)
Changes the value of the encapsulated CountStatistic to the given value.
|
void |
setDescription(String s) |
Statistic |
unmodifiableView()
This method is the essence of this class.
|
public MutableCountStatisticImpl(CountStatistic initial)
initial - an instance of CountStatistic that represents initial statepublic void reset()
reset in interface MutableStatisticpublic void setCount(long count)
setCount in interface MutableCountStatisticcount - long that represents the current value of the Statistic.public Statistic unmodifiableView()
unmodifiableView in interface MutableStatisticreset(),
setCount(long)public long getLastSampleTime()
StatisticgetLastSampleTime in interface Statisticpublic long getStartTime()
StatisticgetStartTime in interface Statisticpublic String getName()
Statisticpublic String getDescription()
StatisticgetDescription in interface Statisticpublic String getUnit()
Statisticpublic Statistic modifiableView()
MutableStatisticmodifiableView in interface MutableStatisticpublic long getCount()
CountStatisticgetCount in interface CountStatisticpublic void setDescription(String s)
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.