Class StringEnumValidator
- java.lang.Object
-
- edu.caltech.nanodb.server.properties.StringEnumValidator
-
- All Implemented Interfaces:
PropertyValidator
public class StringEnumValidator extends java.lang.Object implements PropertyValidator
Validates a string property value against a collection of valid values; if the value cannot be cast to a string or the value doesn't appear in the collection of valid values, then an error will be reported.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
validValues
An array of valid values for the string enumeration.
-
Constructor Summary
Constructors Constructor Description StringEnumValidator(java.lang.String[] validValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
validate(java.lang.Object value)
-
-
-
Method Detail
-
validate
public java.lang.Object validate(java.lang.Object value)
- Specified by:
validate
in interfacePropertyValidator
-
-