Class SuppliedValueStatistic<T extends java.io.Serializable>

  • All Implemented Interfaces:
    ValueStatistic<T>

    public class SuppliedValueStatistic<T extends java.io.Serializable>
    extends java.lang.Object
    implements ValueStatistic<T>
    This class can be used to create a ValueStatistic with a specific StatisticType which value is given by a provided Supplier
    • Field Detail

      • supplier

        private final java.util.function.Supplier<T extends java.io.Serializable> supplier
    • Constructor Detail

      • SuppliedValueStatistic

        public SuppliedValueStatistic​(StatisticType type,
                                      java.util.function.Supplier<T> supplier)
    • Method Detail

      • value

        public T value()
        Specified by:
        value in interface ValueStatistic<T extends java.io.Serializable>
        Returns:
        The current statistic value