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 values
public CssEnumValidator(Collection<String> allowedValues)
CssEnumValidator
instance.
allowedValues
- the allowed values
public 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 values
allowedModificators
- the allowed prefixes
public void addAllowedValues(Collection<String> allowedValues)
allowedValues
- the allowed values
public boolean isValid(String objectString)
ICssDataTypeValidator
isValid
in interface ICssDataTypeValidator
objectString
- the value
Copyright © 1998–2023 iText Group NV. All rights reserved.