java.lang.Object
org.elasticsearch.script.StatsSummary
- All Implemented Interfaces:
DoubleConsumer
The
StatsSummary class accumulates statistical data for a sequence of double values.
This class provides statistics such as count, sum, minimum, maximum, and arithmetic mean of the recorded values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(double value) booleandoubleReturns the arithmetic mean for recorded values.longgetCount()Returns the number of recorded values.doublegetMax()Returns the max for recorded values.doublegetMin()Returns the min for recorded value.doublegetSum()Returns the sum of all recorded values.inthashCode()voidreset()Resets the accumulator, clearing all accumulated statistics.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.DoubleConsumer
andThen
-
Constructor Details
-
StatsSummary
public StatsSummary()
-
-
Method Details
-
accept
public void accept(double value) - Specified by:
acceptin interfaceDoubleConsumer
-
getMin
public double getMin()Returns the min for recorded value. -
getMax
public double getMax()Returns the max for recorded values. -
getAverage
public double getAverage()Returns the arithmetic mean for recorded values. -
getSum
public double getSum()Returns the sum of all recorded values. -
getCount
public long getCount()Returns the number of recorded values. -
reset
public void reset()Resets the accumulator, clearing all accumulated statistics. After calling this method, the accumulator will be in its initial state. -
hashCode
public int hashCode() -
equals
-
toString
-