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 newCssEnumValidator
instance.CssEnumValidator
(Collection<String> allowedValues) Creates a newCssEnumValidator
instance.CssEnumValidator
(Collection<String> allowedValues, Collection<String> allowedModificators) Creates a newCssEnumValidator
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllowedValues
(Collection<String> allowedValues) Adds new allowed values to the allowedValues.boolean
Checks if a value is a valid data type (e.g.
-
Constructor Details
-
CssEnumValidator
Creates a newCssEnumValidator
instance.- Parameters:
-
allowedValues
- the allowed values
-
CssEnumValidator
Creates a newCssEnumValidator
instance.- Parameters:
-
allowedValues
- the allowed values
-
CssEnumValidator
Creates a newCssEnumValidator
instance.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:ICssDataTypeValidator
Checks if a value is a valid data type (e.g. a color, an identifier,...).- Specified by:
-
isValid
in interfaceICssDataTypeValidator
- Parameters:
-
objectString
- the value - Returns:
- true, if the value is a valid data type
-