Package org.terracotta.statistics
Class SuppliedValueStatistic<T extends Serializable>
- java.lang.Object
-
- org.terracotta.statistics.SuppliedValueStatistic<T>
-
- All Implemented Interfaces:
ValueStatistic<T>
public class SuppliedValueStatistic<T extends Serializable> extends Object implements ValueStatistic<T>
This class can be used to create aValueStatisticwith a specificStatisticTypewhich value is given by a providedSupplier- Author:
- Mathieu Carbou
-
-
Constructor Summary
Constructors Constructor Description SuppliedValueStatistic(StatisticType type, Supplier<T> supplier)
-
-
-
Constructor Detail
-
SuppliedValueStatistic
public SuppliedValueStatistic(StatisticType type, Supplier<T> supplier)
-
-
Method Detail
-
value
public T value()
- Specified by:
valuein interfaceValueStatistic<T extends Serializable>- Returns:
- The current statistic value
-
type
public StatisticType type()
- Specified by:
typein interfaceValueStatistic<T extends Serializable>- Returns:
- The statistic type
-
-