Class AggregateUtils
- Since:
- 1.0
- Author:
- Daniel Fernández
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimal
avg
(byte[] target) Returns the average of all the numbers contained in the provided array.static BigDecimal
avg
(double[] target) Returns the average of all the numbers contained in the provided array.static BigDecimal
avg
(float[] target) Returns the average of all the numbers contained in the provided array.static BigDecimal
avg
(int[] target) Returns the average of all the numbers contained in the provided array.static BigDecimal
avg
(long[] target) Returns the average of all the numbers contained in the provided array.static BigDecimal
avg
(short[] target) Returns the average of all the numbers contained in the provided array.static BigDecimal
Returns the average of all the numbers contained in the provided iterable (e.g.static BigDecimal
Returns the average of all the numbers contained in the provided array.static BigDecimal
sum
(byte[] target) Returns the sum of all the numbers contained in the provided array.static BigDecimal
sum
(double[] target) Returns the sum of all the numbers contained in the provided array.static BigDecimal
sum
(float[] target) Returns the sum of all the numbers contained in the provided array.static BigDecimal
sum
(int[] target) Returns the sum of all the numbers contained in the provided array.static BigDecimal
sum
(long[] target) Returns the sum of all the numbers contained in the provided array.static BigDecimal
sum
(short[] target) Returns the sum of all the numbers contained in the provided array.static BigDecimal
Returns the sum of all the numbers contained in the provided iterable (e.g.static BigDecimal
Returns the sum of all the numbers contained in the provided array.
-
Method Details
-
sum
Returns the sum of all the numbers contained in the provided iterable (e.g. a collection).
- Parameters:
target
- the iterable containing the number objects- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
sum
Returns the sum of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the sum, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided iterable (e.g. a collection).
- Parameters:
target
- the iterable containing the number objects- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-
avg
Returns the average of all the numbers contained in the provided array.
- Parameters:
target
- the array of numbers- Returns:
- the average, as a BigDecimal
-