Enum Class SubtotalFunction

java.lang.Object
java.lang.Enum<SubtotalFunction>
io.keikai.model.SubtotalFunction
All Implemented Interfaces:
Serializable, Comparable<SubtotalFunction>, Constable

public enum SubtotalFunction extends Enum<SubtotalFunction>
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
  • Enum Constant Details

  • Method Details

    • values

      public static SubtotalFunction[] 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

      public static SubtotalFunction valueOf(String name)
      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 name
      NullPointerException - 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

      public static SubtotalFunction fromCode(int code)
      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