public final class Aggregators extends Object
Aggregator
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".
public static <I> Aggregator<I,Long> count()
public static <I> Aggregator<I,Long> count(String attributePath)
public static <I,R> Aggregator<I,Set<R>> distinct()
public static <I,R> Aggregator<I,Set<R>> distinct(String attributePath)
public static <I> Aggregator<I,BigDecimal> bigDecimalAvg()
public static <I> Aggregator<I,BigDecimal> bigDecimalAvg(String attributePath)
public static <I> Aggregator<I,BigDecimal> bigIntegerAvg()
public static <I> Aggregator<I,BigDecimal> bigIntegerAvg(String attributePath)
public static <I> Aggregator<I,Double> doubleAvg()
public static <I> Aggregator<I,Double> doubleAvg(String attributePath)
public static <I> Aggregator<I,Double> integerAvg()
public static <I> Aggregator<I,Double> integerAvg(String attributePath)
public static <I> Aggregator<I,Double> longAvg()
public static <I> Aggregator<I,Double> longAvg(String attributePath)
public static <I> Aggregator<I,Double> numberAvg()
public static <I> Aggregator<I,Double> numberAvg(String attributePath)
public static <I> Aggregator<I,BigDecimal> bigDecimalMax()
public static <I> Aggregator<I,BigDecimal> bigDecimalMax(String attributePath)
public static <I> Aggregator<I,BigInteger> bigIntegerMax()
public static <I> Aggregator<I,BigInteger> bigIntegerMax(String attributePath)
public static <I> Aggregator<I,Double> doubleMax()
public static <I> Aggregator<I,Double> doubleMax(String attributePath)
public static <I> Aggregator<I,Integer> integerMax()
public static <I> Aggregator<I,Integer> integerMax(String attributePath)
public static <I> Aggregator<I,Long> longMax()
public static <I> Aggregator<I,Long> longMax(String attributePath)
public static <I,R extends Comparable> Aggregator<I,R> comparableMax()
public static <I,R extends Comparable> Aggregator<I,R> comparableMax(String attributePath)
public static <I> Aggregator<I,BigDecimal> bigDecimalMin()
public static <I> Aggregator<I,BigDecimal> bigDecimalMin(String attributePath)
public static <I> Aggregator<I,BigInteger> bigIntegerMin()
public static <I> Aggregator<I,BigInteger> bigIntegerMin(String attributePath)
public static <I> Aggregator<I,Double> doubleMin()
public static <I> Aggregator<I,Double> doubleMin(String attributePath)
public static <I> Aggregator<I,Integer> integerMin()
public static <I> Aggregator<I,Integer> integerMin(String attributePath)
public static <I> Aggregator<I,Long> longMin()
public static <I> Aggregator<I,Long> longMin(String attributePath)
public static <I,R extends Comparable> Aggregator<I,R> comparableMin()
public static <I,R extends Comparable> Aggregator<I,R> comparableMin(String attributePath)
public static <I> Aggregator<I,BigDecimal> bigDecimalSum()
public static <I> Aggregator<I,BigDecimal> bigDecimalSum(String attributePath)
public static <I> Aggregator<I,BigInteger> bigIntegerSum()
public static <I> Aggregator<I,BigInteger> bigIntegerSum(String attributePath)
public static <I> Aggregator<I,Double> doubleSum()
public static <I> Aggregator<I,Double> doubleSum(String attributePath)
public static <I> Aggregator<I,Long> integerSum()
public static <I> Aggregator<I,Long> integerSum(String attributePath)
public static <I> Aggregator<I,Long> longSum()
public static <I> Aggregator<I,Long> longSum(String attributePath)
public static <I> Aggregator<I,Long> fixedPointSum()
public static <I> Aggregator<I,Long> fixedPointSum(String attributePath)
public static <I> Aggregator<I,Double> floatingPointSum()
public static <I> Aggregator<I,Double> floatingPointSum(String attributePath)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.