Class LongStatistics.Builder

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

public static final class LongStatistics.Builder extends Object
A builder for LongStatistics.
  • 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 LongStatistics instance.
      Returns:
      LongStatistics instance.
    • build

      public LongStatistics build(long... values)
      Builds a LongStatistics instance using the input values.

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

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

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

      Note: LongStatistics 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:
      LongStatistics instance.
      Throws:
      IndexOutOfBoundsException - if the sub-range is out of bounds
      Since:
      1.2