Package io.keikai.model
Enum Class SubtotalFunction
- All Implemented Interfaces:
Serializable,Comparable<SubtotalFunction>,Constable
Enum representing the aggregation functions available for the SUBTOTAL formula.
Each function has a numeric code (1-11) used as the first argument to SUBTOTAL().
Codes 101-111 are the "ignore hidden values" variants (code + 100).
- Since:
- 7.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SubtotalFunctionfromCode(int code) Returns the SubtotalFunction for the given numeric code.intgetCode()Returns the numeric code used as the first argument to the SUBTOTAL() formula.intReturns the "ignore hidden values" variant code (code + 100).static SubtotalFunctionReturns the enum constant of this class with the specified name.static SubtotalFunction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVERAGE
-
COUNT
-
COUNTA
-
MAX
-
MIN
-
PRODUCT
-
STDEV
-
STDEVP
-
SUM
-
VAR
-
VARP
-
-
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
-
getCode
public int getCode()Returns the numeric code used as the first argument to the SUBTOTAL() formula.- Returns:
- the function code (1-11)
-
getIgnoreHiddenCode
public int getIgnoreHiddenCode()Returns the "ignore hidden values" variant code (code + 100).- Returns:
- the function code for ignoring hidden rows (101-111)
-
fromCode
Returns the SubtotalFunction for the given numeric code. Accepts both normal codes (1-11) and ignore-hidden codes (101-111).- Parameters:
code- the function code- Returns:
- the corresponding SubtotalFunction
- Throws:
IllegalArgumentException- if the code is not recognized
-