Class StatsSummary

java.lang.Object
org.elasticsearch.script.StatsSummary
All Implemented Interfaces:
DoubleConsumer

public class StatsSummary extends Object implements 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 Details

    • StatsSummary

      public StatsSummary()
  • Method Details

    • accept

      public void accept(double value)
      Specified by:
      accept in interface DoubleConsumer
    • 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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object