Class IntStatistics.Builder

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

public static final class IntStatistics.Builder extends Object
A builder for IntStatistics.
  • 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

      public IntStatistics build()
      Builds an IntStatistics instance.
      Returns:
      IntStatistics instance.
    • build

      public IntStatistics build(int... values)
      Builds an IntStatistics instance using the input values.

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

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

      public IntStatistics build(int[] values, int from, int to)
      Builds an IntStatistics instance using the specified range of values.

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