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:
java.io.Serializable
,java.lang.Comparable<DataValidationEvaluator.ValidationEnum>
- Enclosing class:
- DataValidationEvaluator
public static enum DataValidationEvaluator.ValidationEnum extends java.lang.Enum<DataValidationEvaluator.ValidationEnum>
Not calling it ValidationType to avoid confusion for now with DataValidationConstraint.ValidationType. Definition order matches OOXML type ID indexes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
isValid(Cell cell, DataValidationEvaluator.DataValidationContext context)
Validates against the type defined in context, as an index of the enum values array.boolean
isValidValue(Cell cell, DataValidationEvaluator.DataValidationContext context)
static DataValidationEvaluator.ValidationEnum
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DataValidationEvaluator.ValidationEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANY
public static final DataValidationEvaluator.ValidationEnum ANY
-
INTEGER
public static final DataValidationEvaluator.ValidationEnum INTEGER
-
DECIMAL
public static final DataValidationEvaluator.ValidationEnum DECIMAL
-
LIST
public static final DataValidationEvaluator.ValidationEnum LIST
-
DATE
public static final DataValidationEvaluator.ValidationEnum DATE
-
TIME
public static final DataValidationEvaluator.ValidationEnum TIME
-
TEXT_LENGTH
public static final DataValidationEvaluator.ValidationEnum TEXT_LENGTH
-
FORMULA
public static final DataValidationEvaluator.ValidationEnum FORMULA
-
-
Method Detail
-
values
public static DataValidationEvaluator.ValidationEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataValidationEvaluator.ValidationEnum c : DataValidationEvaluator.ValidationEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataValidationEvaluator.ValidationEnum valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isValidValue
public boolean isValidValue(Cell cell, DataValidationEvaluator.DataValidationContext context)
-
isValid
public static boolean isValid(Cell cell, DataValidationEvaluator.DataValidationContext context)
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:
java.lang.ArrayIndexOutOfBoundsException
- if the constraint type is an invalid index
-
-