public class SuppliedValueStatistic<T extends java.io.Serializable> extends java.lang.Object implements ValueStatistic<T>
ValueStatistic
with a specific StatisticType
which value is given by a provided Supplier
Constructor and Description |
---|
SuppliedValueStatistic(StatisticType type,
java.util.function.Supplier<T> supplier) |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
counter(java.util.function.Supplier<T> supplier) |
static <T extends java.lang.Number> |
gauge(java.util.function.Supplier<T> supplier) |
static <T extends java.io.Serializable> |
supply(StatisticType type,
java.util.function.Supplier<T> supplier) |
StatisticType |
type() |
T |
value() |
public SuppliedValueStatistic(StatisticType type, java.util.function.Supplier<T> supplier)
public T value()
value
in interface ValueStatistic<T extends java.io.Serializable>
public StatisticType type()
type
in interface ValueStatistic<T extends java.io.Serializable>
public static <T extends java.lang.Number> ValueStatistic<T> counter(java.util.function.Supplier<T> supplier)
public static <T extends java.lang.Number> ValueStatistic<T> gauge(java.util.function.Supplier<T> supplier)
public static <T extends java.io.Serializable> ValueStatistic<T> supply(StatisticType type, java.util.function.Supplier<T> supplier)