Class Aggregators
- java.lang.Object
-
- com.hazelcast.aggregation.Aggregators
-
public final class Aggregators extends java.lang.Object
A utility class to create basicAggregator
instances.Min/Max/Average aggregators are type specific, so an integerAvg() aggregator expects all elements to be integers. There is no conversion executed while accumulating, so if there is any other type met an exception will be thrown.
In order to operate on a generic Number type use the fixedPointSum(), floatingPointSum() and numberAvg() aggregators. All of them will convert the given number to either Long or Double during the accumulation phase. It will result in a lot of allocations since each number has to be converted, but it enables the user to operate on the whole family of numbers. It is especially useful if the numbers given to the aggregators may not be of one type only.
The attributePath given in the factory method allows the aggregator to operate on the value extracted by navigating to the given attributePath on each object that has been returned from a query. The attribute path may be simple, e.g. "name", or nested "address.city".
If an aggregator does not accept null values pass a predicate to the aggregate call that will filter them out.
If the input value or the extracted value is a collection it won't be "unfolded" - so for example count aggregation on "person.postalCodes" will return 1 for each input object and not the size of the collection. In order to calculate the size of the collection use the [any] operator, e.g. "person.postalCodes[any]".
- Since:
- 3.8
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalAvg()
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalAvg(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalMax()
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalMax(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalMin()
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalMin(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalSum()
static <I> Aggregator<I,java.math.BigDecimal>
bigDecimalSum(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigDecimal>
bigIntegerAvg()
static <I> Aggregator<I,java.math.BigDecimal>
bigIntegerAvg(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigInteger>
bigIntegerMax()
static <I> Aggregator<I,java.math.BigInteger>
bigIntegerMax(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigInteger>
bigIntegerMin()
static <I> Aggregator<I,java.math.BigInteger>
bigIntegerMin(java.lang.String attributePath)
static <I> Aggregator<I,java.math.BigInteger>
bigIntegerSum()
static <I> Aggregator<I,java.math.BigInteger>
bigIntegerSum(java.lang.String attributePath)
static <I,R extends java.lang.Comparable>
Aggregator<I,R>comparableMax()
static <I,R extends java.lang.Comparable>
Aggregator<I,R>comparableMax(java.lang.String attributePath)
static <I,R extends java.lang.Comparable>
Aggregator<I,R>comparableMin()
static <I,R extends java.lang.Comparable>
Aggregator<I,R>comparableMin(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Long>
count()
static <I> Aggregator<I,java.lang.Long>
count(java.lang.String attributePath)
static <I,R>
Aggregator<I,java.util.Set<R>>distinct()
static <I,R>
Aggregator<I,java.util.Set<R>>distinct(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
doubleAvg()
static <I> Aggregator<I,java.lang.Double>
doubleAvg(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
doubleMax()
static <I> Aggregator<I,java.lang.Double>
doubleMax(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
doubleMin()
static <I> Aggregator<I,java.lang.Double>
doubleMin(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
doubleSum()
static <I> Aggregator<I,java.lang.Double>
doubleSum(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Long>
fixedPointSum()
static <I> Aggregator<I,java.lang.Long>
fixedPointSum(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
floatingPointSum()
static <I> Aggregator<I,java.lang.Double>
floatingPointSum(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
integerAvg()
static <I> Aggregator<I,java.lang.Double>
integerAvg(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Integer>
integerMax()
static <I> Aggregator<I,java.lang.Integer>
integerMax(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Integer>
integerMin()
static <I> Aggregator<I,java.lang.Integer>
integerMin(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Long>
integerSum()
static <I> Aggregator<I,java.lang.Long>
integerSum(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
longAvg()
static <I> Aggregator<I,java.lang.Double>
longAvg(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Long>
longMax()
static <I> Aggregator<I,java.lang.Long>
longMax(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Long>
longMin()
static <I> Aggregator<I,java.lang.Long>
longMin(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Long>
longSum()
static <I> Aggregator<I,java.lang.Long>
longSum(java.lang.String attributePath)
static <I> Aggregator<I,I>
maxBy(java.lang.String attributePath)
static <I> Aggregator<I,I>
minBy(java.lang.String attributePath)
static <I> Aggregator<I,java.lang.Double>
numberAvg()
static <I> Aggregator<I,java.lang.Double>
numberAvg(java.lang.String attributePath)
-
-
-
Method Detail
-
count
public static <I> Aggregator<I,java.lang.Long> count()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that counts the input values. Accepts nulls as input values. Aggregation result type Long.
-
count
public static <I> Aggregator<I,java.lang.Long> count(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that counts the input values extracted from the given attributePath. Accepts null input values and null extracted values. Aggregation result type Long.
-
distinct
public static <I,R> Aggregator<I,java.util.Set<R>> distinct()
- Type Parameters:
I
- type of the input object.R
- type of the return object.- Returns:
- an aggregator that calculates the distinct set of input values. Accepts null input values. Aggregation result type is a Set of R.
-
distinct
public static <I,R> Aggregator<I,java.util.Set<R>> distinct(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.R
- type of the return object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the distinct set of input values extracted from the given attributePath. Accepts null input values and null extracted values. Aggregation result type is a Set of R.
-
bigDecimalAvg
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalAvg()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigDecimalAvg
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalAvg(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigIntegerAvg
public static <I> Aggregator<I,java.math.BigDecimal> bigIntegerAvg()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only BigInteger input values. Aggregation result type is BigDecimal.
-
bigIntegerAvg
public static <I> Aggregator<I,java.math.BigDecimal> bigIntegerAvg(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only BigInteger input values. Aggregation result type is BigDecimal.
-
doubleAvg
public static <I> Aggregator<I,java.lang.Double> doubleAvg()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
doubleAvg
public static <I> Aggregator<I,java.lang.Double> doubleAvg(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
integerAvg
public static <I> Aggregator<I,java.lang.Double> integerAvg()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Double.
-
integerAvg
public static <I> Aggregator<I,java.lang.Double> integerAvg(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Double.
-
longAvg
public static <I> Aggregator<I,java.lang.Double> longAvg()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only Long input values (primitive and boxed). Aggregation result type is Double.
-
longAvg
public static <I> Aggregator<I,java.lang.Double> longAvg(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only Long input values (primitive and boxed). Aggregation result type is Double.
-
numberAvg
public static <I> Aggregator<I,java.lang.Double> numberAvg()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts generic Number input values. Aggregation result type is Double.
-
numberAvg
public static <I> Aggregator<I,java.lang.Double> numberAvg(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts generic Number input values. Aggregation result type is Double.
-
bigDecimalMax
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalMax()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the max of the input values. Accepts null input values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigDecimalMax
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalMax(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigIntegerMax
public static <I> Aggregator<I,java.math.BigInteger> bigIntegerMax()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the max of the input values. Accepts null input values and null extracted values. Accepts only BigInteger input values. Aggregation result type is BigInteger.
-
bigIntegerMax
public static <I> Aggregator<I,java.math.BigInteger> bigIntegerMax(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values nor null extracted values. Accepts only BigInteger input values. Aggregation result type is BigInteger.
-
doubleMax
public static <I> Aggregator<I,java.lang.Double> doubleMax()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the max of the input values. Accepts null input values and null extracted values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
doubleMax
public static <I> Aggregator<I,java.lang.Double> doubleMax(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
integerMax
public static <I> Aggregator<I,java.lang.Integer> integerMax()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the max of the input values. Accepts null input values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Integer.
-
integerMax
public static <I> Aggregator<I,java.lang.Integer> integerMax(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Integer.
-
longMax
public static <I> Aggregator<I,java.lang.Long> longMax()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the max of the input values. Accepts null input values. Accepts only Long input values (primitive and boxed). Aggregation result type is Long.
-
longMax
public static <I> Aggregator<I,java.lang.Long> longMax(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only Long input values (primitive and boxed). Aggregation result type is Long.
-
comparableMax
public static <I,R extends java.lang.Comparable> Aggregator<I,R> comparableMax()
- Type Parameters:
I
- type of the input object.R
- type of the return object (subtype of Comparable)- Returns:
- an aggregator that calculates the max of the input values. Accepts null input values. Accepts generic Comparable input values. Aggregation result type is R.
-
comparableMax
public static <I,R extends java.lang.Comparable> Aggregator<I,R> comparableMax(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.R
- type of the return object (subtype of Comparable)- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts generic Comparable input values. Aggregation result type is R.
-
maxBy
public static <I> Aggregator<I,I> maxBy(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the max of the input values extracted from the given attributePath and returns the input item containing the maximum value. If multiple items contain the maximum value, any of them is returned. Accepts null input values and null extracted values. Accepts generic Comparable input values.
-
bigDecimalMin
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalMin()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the min of the input values. Accepts null input values and null extracted values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigDecimalMin
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalMin(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigIntegerMin
public static <I> Aggregator<I,java.math.BigInteger> bigIntegerMin()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the min of the input values. Accepts null input values and null extracted values. Accepts only BigInteger input values. Aggregation result type is BigInteger.
-
bigIntegerMin
public static <I> Aggregator<I,java.math.BigInteger> bigIntegerMin(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only BigInteger input values. Aggregation result type is BigInteger.
-
doubleMin
public static <I> Aggregator<I,java.lang.Double> doubleMin()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the min of the input values. Accepts null input values and null extracted values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
doubleMin
public static <I> Aggregator<I,java.lang.Double> doubleMin(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
integerMin
public static <I> Aggregator<I,java.lang.Integer> integerMin()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the min of the input values. Accepts null input values and null extracted values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Integer.
-
integerMin
public static <I> Aggregator<I,java.lang.Integer> integerMin(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Integer.
-
longMin
public static <I> Aggregator<I,java.lang.Long> longMin()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the min of the input values. Accepts null input values and null extracted values. Accepts only Long input values (primitive and boxed). Aggregation result type is Long.
-
longMin
public static <I> Aggregator<I,java.lang.Long> longMin(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts only Long input values (primitive and boxed). Aggregation result type is Long.
-
comparableMin
public static <I,R extends java.lang.Comparable> Aggregator<I,R> comparableMin()
- Type Parameters:
I
- type of the input object.R
- type of the return object (subtype of Comparable)- Returns:
- an aggregator that calculates the min of the input values. Accepts null input values. Accepts generic Comparable input values. Aggregation result type is R.
-
comparableMin
public static <I,R extends java.lang.Comparable> Aggregator<I,R> comparableMin(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.R
- type of the return object (subtype of Comparable)- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values. Accepts generic Comparable input values. Aggregation result type is R.
-
minBy
public static <I> Aggregator<I,I> minBy(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the min of the input values extracted from the given attributePath and returns the input item containing the minimum value. If multiple items contain the minimum value, any of them is returned. Accepts null input values and null extracted values. Accepts generic Comparable input values.
-
bigDecimalSum
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigDecimalSum
public static <I> Aggregator<I,java.math.BigDecimal> bigDecimalSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only BigDecimal input values. Aggregation result type is BigDecimal.
-
bigIntegerSum
public static <I> Aggregator<I,java.math.BigInteger> bigIntegerSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only BigInteger input values. Aggregation result type is BigInteger.
-
bigIntegerSum
public static <I> Aggregator<I,java.math.BigInteger> bigIntegerSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only BigInteger input values. Aggregation result type is BigInteger.
-
doubleSum
public static <I> Aggregator<I,java.lang.Double> doubleSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
doubleSum
public static <I> Aggregator<I,java.lang.Double> doubleSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values. Accepts only Double input values (primitive and boxed). Aggregation result type is Double.
-
integerSum
public static <I> Aggregator<I,java.lang.Long> integerSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Long.
-
integerSum
public static <I> Aggregator<I,java.lang.Long> integerSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values. Accepts only Integer input values (primitive and boxed). Aggregation result type is Long.
-
longSum
public static <I> Aggregator<I,java.lang.Long> longSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only Long input values (primitive and boxed). Aggregation result type is Long.
-
longSum
public static <I> Aggregator<I,java.lang.Long> longSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values. Accepts only Long input values (primitive and boxed). Aggregation result type is Long.
-
fixedPointSum
public static <I> Aggregator<I,java.lang.Long> fixedPointSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts generic Number input values. Aggregation result type is Long.
-
fixedPointSum
public static <I> Aggregator<I,java.lang.Long> fixedPointSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values. Accepts generic Number input values. Aggregation result type is Long.
-
floatingPointSum
public static <I> Aggregator<I,java.lang.Double> floatingPointSum()
- Type Parameters:
I
- type of the input object.- Returns:
- an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts generic Number input values. Aggregation result type is Double.
-
floatingPointSum
public static <I> Aggregator<I,java.lang.Double> floatingPointSum(java.lang.String attributePath)
- Type Parameters:
I
- type of the input object.- Parameters:
attributePath
- the attribute path- Returns:
- an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values. Accepts generic Number input values. Aggregation result type is Double.
-
-