Class CssEnumValidator
java.lang.Object
com.itextpdf.styledxmlparser.css.validate.impl.datatype.CssEnumValidator
- All Implemented Interfaces:
-
ICssDataTypeValidator
ICssDataTypeValidator implementation for elements in an enumeration.
-
Constructor Summary
ConstructorsConstructorDescriptionCssEnumValidator(String... allowedValues) Creates a newCssEnumValidatorinstance.CssEnumValidator(Collection<String> allowedValues) Creates a newCssEnumValidatorinstance.CssEnumValidator(Collection<String> allowedValues, Collection<String> allowedModificators) Creates a newCssEnumValidatorinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllowedValues(Collection<String> allowedValues) Adds new allowed values to the allowedValues.booleanChecks if a value is a valid data type (e.g.
-
Constructor Details
-
CssEnumValidator
Creates a newCssEnumValidatorinstance.- Parameters:
-
allowedValues- the allowed values
-
CssEnumValidator
Creates a newCssEnumValidatorinstance.- Parameters:
-
allowedValues- the allowed values
-
CssEnumValidator
Creates a newCssEnumValidatorinstance.Each allowed value will be added with all the modificators. Each allowed value will be added as well.
- Parameters:
-
allowedValues- the allowed values -
allowedModificators- the allowed prefixes
-
-
Method Details
-
addAllowedValues
Adds new allowed values to the allowedValues.- Parameters:
-
allowedValues- the allowed values
-
isValid
Description copied from interface:ICssDataTypeValidatorChecks if a value is a valid data type (e.g. a color, an identifier,...).- Specified by:
-
isValidin interfaceICssDataTypeValidator - Parameters:
-
objectString- the value - Returns:
- true, if the value is a valid data type
-