Package org.zkoss.pivot.impl
Enum Class StandardCalculator
- All Implemented Interfaces:
Serializable,Comparable<StandardCalculator>,java.lang.constant.Constable,Calculator,ContextualCalculator
The built-in Calculator set for
TabularPivotModel.- Author:
- simonpai
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCalculates the arithmetic average of data.Returns the count of data, including non-number entries.Returns the count of numerical data.Calculates the maximum of data.Calculates the minimum of data.Returns the arithmetic product of data.Returns the sample standard deviation.Returns the standard deviation of the sample.Returns the arithmetic sum of data.Returns the sum of data if the data entries are all numeric.Returns the variance corresponding to the sample standard deviation.Returns the variance corresponding to the standard deviation of the sample. -
Method Summary
Modifier and TypeMethodDescriptionGet theContextType.getLabel()Retrieve the aggregation result from the context.static StandardCalculatorReturns the enum constant of this class with the specified name.static StandardCalculator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUM
Returns the arithmetic sum of data. Non numeric values are omitted. Returns 0 if no numeric values are present. -
COUNT
Returns the count of data, including non-number entries. -
AVERAGE
Calculates the arithmetic average of data. Non numeric values are omitted. Returns null if no numeric values are present. -
MAX
Calculates the maximum of data. Non numeric values are omitted. Returns null if no numeric values are present. -
MIN
Calculates the minimum of data. Non numeric values are omitted. Returns null if no numeric values are present. -
SUM_OR_COUNT
Returns the sum of data if the data entries are all numeric. Returns count of data otherwise. -
COUNT_NUMBER
Returns the count of numerical data. Non-number entries are omitted. -
PRODUCT
Returns the arithmetic product of data. Non numeric values are omitted. Returns 1 if no numeric values are present. -
STD_DEV
Returns the sample standard deviation. (The one with variance by dividing N - 1.) -
STD_DEV_P
Returns the standard deviation of the sample. (The one with variance by dividing N.) -
VARIANCE
Returns the variance corresponding to the sample standard deviation. (The one by dividing N - 1.) -
VARIANCE_P
Returns the variance corresponding to the standard deviation of the sample. (The one by dividing N.)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getResult
Description copied from interface:ContextualCalculatorRetrieve the aggregation result from the context.- Specified by:
getResultin interfaceContextualCalculator
-
getContextType
Description copied from interface:ContextualCalculatorGet theContextType.- Specified by:
getContextTypein interfaceContextualCalculator
-
getLabel
- Specified by:
getLabelin interfaceCalculator
-
getLabelKey
- Specified by:
getLabelKeyin interfaceCalculator
-