Package org.apache.poi.ss.formula
Enum Class EvaluationConditionalFormatRule.OperatorEnum
java.lang.Object
java.lang.Enum<EvaluationConditionalFormatRule.OperatorEnum>
org.apache.poi.ss.formula.EvaluationConditionalFormatRule.OperatorEnum
- All Implemented Interfaces:
Serializable
,Comparable<EvaluationConditionalFormatRule.OperatorEnum>
,Constable
- Enclosing class:
- EvaluationConditionalFormatRule
public static enum EvaluationConditionalFormatRule.OperatorEnum
extends Enum<EvaluationConditionalFormatRule.OperatorEnum>
Not calling it OperatorType to avoid confusion for now with other classes.
Definition order matches OOXML type ID indexes.
Note that this has NO_COMPARISON as the first item, unlike the similar
DataValidation operator enum. Thanks, Microsoft.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionabstract <C extends Comparable<C>>
booleanisValid
(C cellValue, C v1, C v2) Evaluates comparison using operator instance rulesboolean
Called when the cell and comparison values are of different data types Needed for negation operators, which should return true.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_COMPARISON
-
BETWEEN
-
NOT_BETWEEN
-
EQUAL
-
NOT_EQUAL
-
GREATER_THAN
-
LESS_THAN
-
GREATER_OR_EQUAL
-
LESS_OR_EQUAL
-
-
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
-
isValid
Evaluates comparison using operator instance rules- Parameters:
cellValue
- won't be null, assumption is previous checks handled thatv1
- if null, per Excel behavior various results depending on the type of cellValue and the specific enum instancev2
- null if not needed. If null when needed, various results, per Excel behavior- Returns:
- true if the comparison is valid
-
isValidForIncompatibleTypes
public boolean isValidForIncompatibleTypes()Called when the cell and comparison values are of different data types Needed for negation operators, which should return true.- Returns:
- true if this comparison is true when the types to compare are different
-