Class Aggregators


  • public final class Aggregators
    extends java.lang.Object
    Helper class to construct the builtin aggregator types. These methods can be statically imported to make query building look better in source code
    Author:
    teck
    • Method Detail

      • min

        public static Aggregator min​(Attribute<?> attribute)
        Construct a minimum value aggregator
        Parameters:
        attribute -
        Returns:
        min aggregator
      • max

        public static Aggregator max​(Attribute<?> attribute)
        Construct a maximum value aggregator
        Parameters:
        attribute -
        Returns:
        max aggregator
      • average

        public static Aggregator average​(Attribute<?> attribute)
        Construct an average value aggregator
        Parameters:
        attribute -
        Returns:
        average aggregator
      • sum

        public static Aggregator sum​(Attribute<?> attribute)
        Construct a sum aggregator
        Parameters:
        attribute -
        Returns:
        sum aggregator
      • count

        public static Aggregator count()
        Construct a counting aggregator
        Returns:
        count aggregator