Enum StandardCalculator

    • Enum Constant Detail

      • SUM

        public static final StandardCalculator SUM
        Returns the arithmetic sum of data. Non numeric values are omitted. Returns 0 if no numeric values are present.
      • COUNT

        public static final StandardCalculator COUNT
        Returns the count of data, including non-number entries.
      • AVERAGE

        public static final StandardCalculator AVERAGE
        Calculates the arithmetic average of data. Non numeric values are omitted. Returns null if no numeric values are present.
      • MAX

        public static final StandardCalculator MAX
        Calculates the maximum of data. Non numeric values are omitted. Returns null if no numeric values are present.
      • MIN

        public static final StandardCalculator MIN
        Calculates the minimum of data. Non numeric values are omitted. Returns null if no numeric values are present.
      • SUM_OR_COUNT

        public static final StandardCalculator SUM_OR_COUNT
        Returns the sum of data if the data entries are all numeric. Returns count of data otherwise.
      • COUNT_NUMBER

        public static final StandardCalculator COUNT_NUMBER
        Returns the count of numerical data. Non-number entries are omitted.
      • PRODUCT

        public static final StandardCalculator PRODUCT
        Returns the arithmetic product of data. Non numeric values are omitted. Returns 1 if no numeric values are present.
      • STD_DEV

        public static final StandardCalculator STD_DEV
        Returns the sample standard deviation. (The one with variance by dividing N - 1.)
      • STD_DEV_P

        public static final StandardCalculator STD_DEV_P
        Returns the standard deviation of the sample. (The one with variance by dividing N.)
      • VARIANCE

        public static final StandardCalculator VARIANCE
        Returns the variance corresponding to the sample standard deviation. (The one by dividing N - 1.)
      • VARIANCE_P

        public static final StandardCalculator VARIANCE_P
        Returns the variance corresponding to the standard deviation of the sample. (The one by dividing N.)
    • Method Detail

      • values

        public static StandardCalculator[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StandardCalculator c : StandardCalculator.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StandardCalculator valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null