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 forIntStatistics
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntStatistics
build()
Builds anIntStatistics
instance.IntStatistics
build(int... values)
Builds anIntStatistics
instance using the inputvalues
.IntStatistics
build(int[] values, int from, int to)
Builds anIntStatistics
instance using the specified range ofvalues
.IntStatistics.Builder
setConfiguration(StatisticsConfiguration v)
Sets the statistics configuration options for computation of statistics.
-
-
-
Method Detail
-
setConfiguration
public IntStatistics.Builder setConfiguration(StatisticsConfiguration v)
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 anIntStatistics
instance.- Returns:
IntStatistics
instance.
-
build
public IntStatistics build(int... values)
Builds anIntStatistics
instance using the inputvalues
.Note:
IntStatistics
computed usingaccept
may be different from this instance.- Parameters:
values
- Values.- Returns:
IntStatistics
instance.
-
build
public IntStatistics build(int[] values, int from, int to)
Builds anIntStatistics
instance using the specified range ofvalues
.Note:
IntStatistics
computed usingaccept
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
-
-