Class MultipleStringValueValidator
- java.lang.Object
-
- net.adoptopenjdk.icedteaweb.config.validators.MultipleStringValueValidator
-
- All Implemented Interfaces:
ValueValidator
public class MultipleStringValueValidator extends java.lang.Object implements ValueValidator
Checks that the value is one of the acceptable single String values or an acceptable combination of String values
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]comboOptionsprivate java.lang.String[]singleOptions
-
Constructor Summary
Constructors Constructor Description MultipleStringValueValidator(java.lang.String[] singleOptions, java.lang.String[] comboOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancomboOptionsContains(java.lang.String possibleVal)java.lang.StringgetPossibleValues()Returns a string describing possible values in human-readable form that thisValueValidatoracceptsvoidvalidate(java.lang.Object value)This method checks if the given object is a valid value for this specificValueValidator.
-
-
-
Method Detail
-
validate
public void validate(java.lang.Object value) throws java.lang.IllegalArgumentExceptionDescription copied from interface:ValueValidatorThis method checks if the given object is a valid value for this specificValueValidator. Any arbitrary operation can be performed to ensure that the value is valid.- Specified by:
validatein interfaceValueValidator- Parameters:
value- The object to validate- Throws:
java.lang.IllegalArgumentException- if the value is invalid
-
comboOptionsContains
private boolean comboOptionsContains(java.lang.String possibleVal)
-
getPossibleValues
public java.lang.String getPossibleValues()
Description copied from interface:ValueValidatorReturns a string describing possible values in human-readable form that thisValueValidatoraccepts- Specified by:
getPossibleValuesin interfaceValueValidator- Returns:
- a string describing possible values that this
ValueValidatoraccepts
-
-