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 TypeMethodDescriptionvoid
accept
(double value) boolean
double
Returns the arithmetic mean for recorded values.long
getCount()
Returns the number of recorded values.double
getMax()
Returns the max for recorded values.double
getMin()
Returns the min for recorded value.double
getSum()
Returns the sum of all recorded values.int
hashCode()
void
reset()
Resets the accumulator, clearing all accumulated statistics.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.function.DoubleConsumer
andThen
-
Constructor Details
-
StatsSummary
public StatsSummary()
-
-
Method Details
-
accept
public void accept(double value) - Specified by:
accept
in 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
-