Class Aggregators


  • public class Aggregators
    extends Object
    Simple Aggregator DSL.

    The methods in this class are for the most part simple factory methods for various InvocableMap.EntryAggregator classes, but in some cases provide additional type safety. They also tend to make the code more readable, especially if imported statically, so their use is strongly encouraged in lieu of direct construction of InvocableMap.EntryAggregator classes.

    Author:
    lh, hr 2018.06.12
    • Constructor Detail

      • Aggregators

        public Aggregators()
    • Method Detail

      • asynchronous

        public static <K,​V,​P,​R> AsynchronousAggregator<K,​V,​P,​R> asynchronous​(InvocableMap.StreamingAggregator<K,​V,​P,​R> aggregator)
        Return an AsynchronousAggregator for a given streaming aggregator.
        Type Parameters:
        K - the type of the Map entry keys
        V - the type of the Map entry values
        P - the type of the intermediate result during the parallel stage
        R - the type of the value returned by the StreamingAggregator
        Parameters:
        aggregator - the underlying streaming aggregator
      • asynchronous

        public static <K,​V,​P,​R> InvocableMap.EntryAggregator<K,​V,​R> asynchronous​(InvocableMap.StreamingAggregator<K,​V,​P,​R> aggregator,
                                                                                                               int iUnitOrderId)
        Return an AsynchronousAggregator for a given streaming aggregator.
        Parameters:
        aggregator - the underlying streaming aggregator
        iUnitOrderId - the unit-of-order id for this aggregator
      • average

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> average​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • average

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Double> average​(String sMethod)
        Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • max

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> max​(Remote.ToDoubleFunction<? super T> extractor)
        Return an aggregator that calculates a maximum of the double values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Double
      • min

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> min​(Remote.ToDoubleFunction<? super T> extractor)
        Return an aggregator that calculates a minimum of the double values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Double
      • sum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> sum​(Remote.ToDoubleFunction<? super T> extractor)
        Return an aggregator that calculates a sum of the double values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Double
      • average

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> average​(Remote.ToDoubleFunction<? super T> extractor)
        Return an aggregator that calculates an average of the double values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Double
      • doubleMax

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> doubleMax​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • doubleMax

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Double> doubleMax​(String sMethod)
        Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • doubleMin

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> doubleMin​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • doubleMin

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Double> doubleMin​(String sMethod)
        Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • doubleSum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> doubleSum​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • doubleSum

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Double> doubleSum​(String sMethod)
        Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • max

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> max​(Remote.ToIntFunction<? super T> extractor)
        Return an aggregator that calculates a maximum of the int values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an Integer
      • min

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> min​(Remote.ToIntFunction<? super T> extractor)
        Return an aggregator that calculates a minimum of the int values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an Integer
      • sum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> sum​(Remote.ToIntFunction<? super T> extractor)
        Return an aggregator that calculates a sum of the int values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an Integer
      • average

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> average​(Remote.ToIntFunction<? super T> extractor)
        Return an aggregator that calculates an average of the int values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an Integer
      • max

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> max​(Remote.ToLongFunction<? super T> extractor)
        Return an aggregator that calculates a maximum of the long values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Long
      • min

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> min​(Remote.ToLongFunction<? super T> extractor)
        Return an aggregator that calculates a minimum of the long values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Long
      • sum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> sum​(Remote.ToLongFunction<? super T> extractor)
        Return an aggregator that calculates a sum of the long values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Long
      • average

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Double> average​(Remote.ToLongFunction<? super T> extractor)
        Return an aggregator that calculates an average of the long values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Long
      • longMax

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> longMax​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • longMax

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Long> longMax​(String sMethod)
        Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • longMin

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> longMin​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • longMin

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Long> longMin​(String sMethod)
        Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • longSum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​Long> longSum​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • longSum

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Long> longSum​(String sMethod)
        Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • max

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> max​(Remote.ToBigDecimalFunction<? super T> extractor)
        Return an aggregator that calculates a maximum of the BigDecimal values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an BigDecimal
      • min

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> min​(Remote.ToBigDecimalFunction<? super T> extractor)
        Return an aggregator that calculates a minimum of the BigDecimal values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an BigDecimal
      • sum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> sum​(Remote.ToBigDecimalFunction<? super T> extractor)
        Return an aggregator that calculates a sum of the BigDecimal values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an BigDecimal
      • average

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> average​(Remote.ToBigDecimalFunction<? super T> extractor)
        Return an aggregator that calculates an average of the BigDecimal values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is an BigDecimal
      • bigDecimalAverage

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalAverage​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • bigDecimalAverage

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalAverage​(String sMethod)
        Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • bigDecimalMax

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalMax​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • bigDecimalMax

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalMax​(String sMethod)
        Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • bigDecimalMin

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalMin​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • bigDecimalMin

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalMin​(String sMethod)
        Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • bigDecimalSum

        public static <K,​V,​T> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalSum​(ValueExtractor<? super T,​? extends Number> extractor)
        Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Number
      • bigDecimalSum

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​BigDecimal> bigDecimalSum​(String sMethod)
        Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as BigDecimal values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object that is a Number
      • max

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> max​(Remote.ToComparableFunction<? super T,​? extends R> extractor)
        Return an aggregator that calculates a maximum of the Comparable values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Comparable
      • min

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> min​(Remote.ToComparableFunction<? super T,​? extends R> extractor)
        Return an aggregator that calculates a minimum of the Comparable values extracted from a set of entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object that is a Comparable
      • comparableMax

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMax​(ValueExtractor<? super T,​? extends R> extractor)
        Return an aggregator that calculates a maximum of the Comparable values extracted from a set of entries in a Map. All the extracted objects will be treated as Comparable values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides a value in the form of any object that implements Comparable interface
      • comparableMax

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMax​(ValueExtractor<? super T,​? extends R> extractor,
                                                                                                                                                          Comparator<? super R> comparator)
        Return an aggregator that calculates a maximum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specified Comparator.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides an object to be compared
        comparator - the comparator used to compare the extracted object
      • comparableMax

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMax​(String sMethod)
        Return an aggregator that calculates a maximum of the Comparable values extracted from a set of entries in a Map. All the extracted objects will be treated as Comparable values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns a value in the form of any object that implements Comparable interface
      • comparableMax

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMax​(String sMethod,
                                                                                                                                                          Comparator<? super R> comparator)
        Return an aggregator that calculates a maximum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specified Comparator.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns the value to be compared
        comparator - the comparator used to compare the extracted object
      • comparableMin

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMin​(ValueExtractor<? super T,​? extends R> extractor)
        Return an aggregator that calculates a minimum of the Comparable values extracted from a set of entries in a Map. All the extracted objects will be treated as Comparable values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides a value in the form of any object that implements Comparable interface
      • comparableMin

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMin​(ValueExtractor<? super T,​? extends R> extractor,
                                                                                                                                                          Comparator<? super R> comparator)
        Return an aggregator that calculates a minimum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specified Comparator.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides an object to be compared
        comparator - the comparator used to compare the extracted object
      • comparableMin

        public static <K,​V,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMin​(String sMethod)
        Return an aggregator that calculates a minimum of the Comparable values extracted from a set of entries in a Map. All the extracted objects will be treated as Comparable values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns a value in the form of any object that implements Comparable interface
      • comparableMin

        public static <K,​V,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R> comparableMin​(String sMethod,
                                                                                                                                                  Comparator<? super R> comparator)
        Return an aggregator that calculates a minimum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specified Comparator.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns a value in the form of any object that implements Comparable interface
      • count

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​Integer,​Integer> count()
        Return an aggregator that calculates the count of the entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
      • distinctValues

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​Collection<V>> distinctValues()
        Return an aggregator that calculates the set of distinct values from the entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
      • distinctValues

        public static <K,​V,​T,​R> InvocableMap.StreamingAggregator<K,​V,​?,​Collection<R>> distinctValues​(ValueExtractor<? super T,​? extends R> extractor)
        Return an aggregator that calculates the set of distinct values extracted from the entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides a value in the form of any Java object
      • distinctValues

        public static <K,​V,​R> InvocableMap.StreamingAggregator<K,​V,​?,​Collection<R>> distinctValues​(String sMethod)
        Return an aggregator that calculates the set of distinct values extracted from the entries in a Map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns a value in the form of any Java object
      • composite

        public static <K,​V> InvocableMap.StreamingAggregator<K,​V,​?,​List<?>> composite​(InvocableMap.EntryAggregator... aAggregator)
        Return an aggregator that calculates the the combined set of results from a number of aggregators.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        Parameters:
        aAggregator - an array of EntryAggregator objects; may not be null
        Throws:
        NullPointerException - if the aggregator array is null
      • grouping

        public static <K,​V,​E,​R> InvocableMap.StreamingAggregator<K,​V,​Map<E,​Object>,​Map<E,​R>> grouping​(InvocableMap.EntryAggregator<K,​V,​R> aggregator,
                                                                                                                                                      String... asNames)
        Create an instance of group aggregator based on a specified property or method name(s) and an InvocableMap.EntryAggregator.
        Type Parameters:
        K - the type of the Map entry keys
        V - the type of the Map entry values
        E - the type of the extracted value
        R - the type of the group aggregator result
        Parameters:
        aggregator - an underlying EntryAggregator
        asNames - the property or method name(s) to extract values from. The resulting ValueExtractor is used to split InvocableMap entries into distinct groups.
      • grouping

        public static <K,​V,​E,​R> InvocableMap.StreamingAggregator<K,​V,​Map<E,​Object>,​Map<E,​R>> grouping​(InvocableMap.EntryAggregator<K,​V,​R> aggregator,
                                                                                                                                                      Filter filter,
                                                                                                                                                      String... asNames)
        Create an instance of group aggregator based on a specified property or method name(s) and an InvocableMap.EntryAggregator.
        Type Parameters:
        K - the type of the Map entry keys
        V - the type of the Map entry values
        E - the type of the extracted value
        R - the type of the group aggregator result
        Parameters:
        aggregator - an underlying EntryAggregator
        filter - an optional Filter object that will be used to evaluate results of each individual group aggregation
        asNames - the property or method name(s) to extract values from. The resulting ValueExtractor is used to split InvocableMap entries into distinct groups.
      • grouping

        public static <K,​V,​T,​E,​R> InvocableMap.StreamingAggregator<K,​V,​Map<E,​Object>,​Map<E,​R>> grouping​(ValueExtractor<? super T,​? extends E> extractor,
                                                                                                                                                              InvocableMap.EntryAggregator<K,​V,​R> aggregator)
        Create an instance of group aggregator based on a specified property or method name(s) and an InvocableMap.EntryAggregator.
        Type Parameters:
        K - the type of the Map entry keys
        V - the type of the Map entry values
        T - the type of the value to extract from
        E - the type of the extracted value
        R - the type of the group aggregator result
        Parameters:
        extractor - a ValueExtractor that will be used to split a set of InvocableMap entries into distinct groups
        aggregator - an underlying EntryAggregator
      • grouping

        public static <K,​V,​T,​E,​R> InvocableMap.StreamingAggregator<K,​V,​Map<E,​Object>,​Map<E,​R>> grouping​(ValueExtractor<? super T,​? extends E> extractor,
                                                                                                                                                              InvocableMap.EntryAggregator<? super K,​? super V,​R> aggregator,
                                                                                                                                                              Filter filter)
        Create an instance of group aggregator based on a specified property or method name(s) and an InvocableMap.EntryAggregator.
        Type Parameters:
        K - the type of the Map entry keys
        V - the type of the Map entry values
        T - the type of the value to extract from
        E - the type of the extracted value
        R - the type of the group aggregator result
        Parameters:
        extractor - a ValueExtractor that will be used to split a set of InvocableMap entries into distinct groups
        aggregator - an underlying EntryAggregator
        filter - an optional Filter object used to filter out results of individual group aggregation results
      • topN

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R[]> topN​(ValueExtractor<? super T,​? extends R> extractor,
                                                                                                                                                   int cResults)
        Return an aggregator that calculates the top n of the Comparable values extracted from a set of entries in a Map. All the extracted objects will be treated as Comparable values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides a value in the form of any object that implements Comparable interface
        cResults - the maximum number of results to return
      • topN

        public static <K,​V,​T,​R> InvocableMap.StreamingAggregator<K,​V,​?,​R[]> topN​(ValueExtractor<? super T,​? extends R> extractor,
                                                                                                                     Comparator<? super R> comparator,
                                                                                                                     int cResults)
        Return an aggregator that calculates the top n of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specified Comparator.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides an object to be compared
        comparator - the comparator used to compare the extracted object
        cResults - the maximum number of results to return
      • topN

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​R[]> topN​(String sMethod,
                                                                                                                                                   int cResults)
        Return an aggregator that calculates the top n of the Comparable values extracted from a set of entries in a Map. All the extracted objects will be treated as Comparable values.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns a value in the form of any object that implements Comparable interface
        cResults - the maximum number of results to return
      • topN

        public static <K,​V,​T,​R> InvocableMap.StreamingAggregator<K,​V,​?,​R[]> topN​(String sMethod,
                                                                                                                     Comparator<? super R> comparator,
                                                                                                                     int cResults)
        Return an aggregator that calculates the top n of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specified Comparator.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method that returns the value to be compared
        comparator - the comparator used to compare the extracted object
        cResults - the maximum number of results to return
      • reduce

        public static <K,​V,​T,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​Map<K,​R>> reduce​(ValueExtractor<? super T,​? extends R> extractor)
        Return an aggregator that will return the extracted value for each entry in the map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        T - the type of the value to extract from
        R - the type of the aggregation result
        Parameters:
        extractor - the extractor that provides an value(s) to be returned
      • reduce

        public static <K,​V,​R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,​V,​?,​Map<K,​R>> reduce​(String sMethod)
        Return an aggregator that will return the extracted value for each entry in the map.
        Type Parameters:
        K - the type of the entry's key
        V - the type of the entry's value
        R - the type of the aggregation result
        Parameters:
        sMethod - the name of the method to use to obtain the value