Package org.apache.poi.ss.formula
Enum DataValidationEvaluator.ValidationEnum
java.lang.Object
java.lang.Enum<DataValidationEvaluator.ValidationEnum>
org.apache.poi.ss.formula.DataValidationEvaluator.ValidationEnum
- All Implemented Interfaces:
Serializable,Comparable<DataValidationEvaluator.ValidationEnum>,java.lang.constant.Constable
- Enclosing class:
DataValidationEvaluator
public static enum DataValidationEvaluator.ValidationEnum
extends Enum<DataValidationEvaluator.ValidationEnum>
Not calling it ValidationType to avoid confusion for now with DataValidationConstraint.ValidationType.
Definition order matches OOXML type ID indexes
-
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 booleanisValid(Cell cell, DataValidationEvaluator.DataValidationContext context) Validates against the type defined in context, as an index of the enum values array.booleanisValidValue(Cell cell, DataValidationEvaluator.DataValidationContext context) Returns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ANY
-
INTEGER
-
DECIMAL
-
LIST
-
DATE
-
TIME
-
TEXT_LENGTH
-
FORMULA
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException- if the argument is null
-
isValidValue
-
isValid
Validates against the type defined in context, as an index of the enum values array.- Parameters:
cell- Cell to check validity ofcontext- The Data Validation to check against- Returns:
- true if validation passes
- Throws:
ArrayIndexOutOfBoundsException- if the constraint type is an invalid index
-