public class CssEnumValidator extends Object implements ICssDataTypeValidator
ICssDataTypeValidator implementation for elements in an enumeration.| Constructor and Description |
|---|
CssEnumValidator(Collection<String> allowedValues)
Creates a new
CssEnumValidator instance. |
CssEnumValidator(Collection<String> allowedValues,
Collection<String> allowedModificators)
Creates a new
CssEnumValidator instance. |
CssEnumValidator(String... allowedValues)
Creates a new
CssEnumValidator instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllowedValues(Collection<String> allowedValues)
Adds new allowed values to the allowedValues.
|
boolean |
isValid(String objectString)
Checks if a value is a valid data type (e.g.
|
public CssEnumValidator(String... allowedValues)
CssEnumValidator instance.allowedValues - the allowed valuespublic CssEnumValidator(Collection<String> allowedValues)
CssEnumValidator instance.allowedValues - the allowed valuespublic CssEnumValidator(Collection<String> allowedValues, Collection<String> allowedModificators)
CssEnumValidator instance.
Each allowed value will be added with all the modificators. Each allowed value will be added as well.
allowedValues - the allowed valuesallowedModificators - the allowed prefixespublic void addAllowedValues(Collection<String> allowedValues)
allowedValues - the allowed valuespublic boolean isValid(String objectString)
ICssDataTypeValidatorisValid in interface ICssDataTypeValidatorobjectString - the valueCopyright © 1998–2023 Apryse Group NV. All rights reserved.