Class DoubleStatistics.Builder

java.lang.Object
org.apache.commons.statistics.descriptive.DoubleStatistics.Builder
Enclosing class:
DoubleStatistics

public static final class DoubleStatistics.Builder extends Object
A builder for DoubleStatistics.
  • Method Details

    • setConfiguration

      Sets the statistics configuration options for computation of statistics.
      Parameters:
      v - Value.
      Returns:
      the builder
      Throws:
      NullPointerException - if the value is null
    • build

      Builds a DoubleStatistics instance.
      Returns:
      DoubleStatistics instance.
    • build

      public DoubleStatistics build(double... values)
      Builds a DoubleStatistics instance using the input values.

      Note: DoubleStatistics computed using accept may be different from this instance.

      Parameters:
      values - Values.
      Returns:
      DoubleStatistics instance.
    • build

      public DoubleStatistics build(double[] values, int from, int to)
      Builds a DoubleStatistics instance using the specified range of values.

      Note: DoubleStatistics computed using accept may be different from this instance.

      Parameters:
      values - Values.
      from - Inclusive start of the range.
      to - Exclusive end of the range.
      Returns:
      DoubleStatistics instance.
      Throws:
      IndexOutOfBoundsException - if the sub-range is out of bounds
      Since:
      1.2