Class Aggregators


  • public class Aggregators
    extends java.lang.Object
    • Constructor Detail

      • Aggregators

        public Aggregators()
    • Method Detail

      • minMaxItem

        private static <V extends java.lang.Comparable<V>> IAggregator<IItem,​?> minMaxItem​(java.lang.String name,
                                                                                                 IAttribute<V> attribute,
                                                                                                 boolean max)
      • itemWithMin

        public static <V extends java.lang.Comparable<V>> IAggregator<IItem,​?> itemWithMin​(IAttribute<V> attribute)
      • itemWithMax

        public static <V extends java.lang.Comparable<V>> IAggregator<IItem,​?> itemWithMax​(IAttribute<V> attribute)
      • variance

        public static IAggregator<IQuantity,​?> variance​(IAttribute<IQuantity> attribute)
        Calculates the sample variance for a linear quantity attribute.
        Parameters:
        attribute - the attribute to calculate the sample variance for
        Returns:
        the variance for the attribute
      • variancep

        public static IAggregator<IQuantity,​?> variancep​(IAttribute<IQuantity> attribute)
        Calculates the population variance for a linear quantity attribute.
        Parameters:
        attribute - the attribute to calculate the population variance for
        Returns:
        the variance for the attribute
      • stddev

        public static IAggregator<IQuantity,​?> stddev​(IAttribute<IQuantity> attribute)
        Calculates the sample standard deviation for a linear quantity attribute.
        Parameters:
        attribute - the attribute to calculate the sample standard deviation for
        Returns:
        the standard deviation for the attribute
      • stddev

        public static IAggregator<IQuantity,​?> stddev​(java.lang.String name,
                                                            java.lang.String description,
                                                            IAttribute<IQuantity> attribute)
        Calculates the sample standard deviation for a linear quantity attribute.
        Parameters:
        name - aggregator name
        description - aggregator description
        attribute - the attribute to calculate the sample standard deviation for
        Returns:
        an aggregator that calculates the standard deviation for the attribute
      • stddevp

        public static IAggregator<IQuantity,​?> stddevp​(IAttribute<IQuantity> attribute)
        Calculates the population standard deviation for a linear quantity attribute.
        Parameters:
        attribute - the attribute to calculate the population standard deviation for
        Returns:
        an aggregator that calculates the standard deviation for the attribute
      • stddevp

        public static IAggregator<IQuantity,​?> stddevp​(java.lang.String name,
                                                             java.lang.String description,
                                                             IAttribute<IQuantity> attribute)
        Calculates the population standard deviation for a linear quantity attribute.
        Parameters:
        name - aggregator name
        description - aggregator description
        attribute - the attribute to calculate the population standard deviation for
        Returns:
        an aggregator that calculates the standard deviation for the attribute
      • stddevInternal

        private static IAggregator<IQuantity,​?> stddevInternal​(java.lang.String name,
                                                                     java.lang.String description,
                                                                     IAttribute<IQuantity> attribute,
                                                                     boolean besselCorrection)
      • min

        public static <V extends java.lang.Comparable<V>> IAggregator<V,​?> min​(IAttribute<V> attribute)
      • min

        public static <V extends java.lang.Comparable<V>> IAggregator<V,​?> min​(java.lang.String typeId,
                                                                                     IAttribute<V> attribute)
      • min

        public static <V extends java.lang.Comparable<V>> IAggregator<V,​?> min​(java.lang.String name,
                                                                                     java.lang.String description,
                                                                                     java.lang.String typeId,
                                                                                     IAttribute<V> attribute)
      • max

        public static <V extends java.lang.Comparable<V>> IAggregator<V,​?> max​(IAttribute<V> attribute)
      • max

        public static <V extends java.lang.Comparable<V>> IAggregator<V,​?> max​(java.lang.String name,
                                                                                     java.lang.String description,
                                                                                     IAttribute<V> attribute)
      • max

        public static <V extends java.lang.Comparable<V>> IAggregator<V,​?> max​(java.lang.String name,
                                                                                     java.lang.String description,
                                                                                     java.lang.String typeId,
                                                                                     IAttribute<V> attribute)
      • and

        public static IAggregator<java.lang.Boolean,​?> and​(java.lang.String typeId,
                                                                 IAttribute<java.lang.Boolean> attribute)
      • or

        public static IAggregator<java.lang.Boolean,​?> or​(java.lang.String typeId,
                                                                IAttribute<java.lang.Boolean> attribute)
      • distinctAsString

        public static IAggregator<java.lang.String,​?> distinctAsString​(java.lang.String typeId,
                                                                             IAttribute<java.lang.String> attribute)
      • distinctAsString

        public static IAggregator<java.lang.String,​?> distinctAsString​(IAttribute<java.lang.String> attribute,
                                                                             java.lang.String delimiter)
      • distinctAsString

        public static IAggregator<java.lang.String,​?> distinctAsString​(IAttribute<java.lang.String> attribute,
                                                                             java.lang.String delimiter,
                                                                             java.lang.String name,
                                                                             java.lang.String description)
      • valueBuilderAggregator

        public static <V1,​V2,​C extends IItemConsumer<C>> IAggregator<V2,​C> valueBuilderAggregator​(IAggregator<V1,​C> aggregator,
                                                                                                                    IValueBuilder<V2,​V1> valuebuilder,
                                                                                                                    java.lang.String name,
                                                                                                                    java.lang.String description)
      • getCountName

        private static java.lang.String getCountName​(IType<?> type)
      • getSumName

        static java.lang.String getSumName​(java.lang.String name)
      • getVarianceName

        static java.lang.String getVarianceName​(java.lang.String name,
                                                boolean besselCorrection)
      • getStddevName

        static java.lang.String getStddevName​(java.lang.String name,
                                              boolean besselCorrection)
      • getAvgName

        static java.lang.String getAvgName​(java.lang.String name)
      • getMaxName

        static java.lang.String getMaxName​(java.lang.String name,
                                           ContentType<?> ct)
      • getMinName

        static java.lang.String getMinName​(java.lang.String name,
                                           ContentType<?> ct)
      • getQuantityAggregator

        public static IAggregator<IQuantity,​?> getQuantityAggregator​(java.lang.String name,
                                                                           IType<?> type)
      • getQuantityAggregator

        public static IAggregator<IQuantity,​?> getQuantityAggregator​(java.lang.String name)