Class RangedIntegerValidator
java.lang.Object
net.adoptopenjdk.icedteaweb.config.validators.RangedIntegerValidator
- All Implemented Interfaces:
ValueValidator
- Direct Known Subclasses:
PortValidator
Checks that the value is an Integer or Long (or a String representation
of one) that is within a desired range).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a string describing possible values in human-readable form that thisValueValidatoracceptsvoidThis method checks if the given object is a valid value for this specificValueValidator.
-
Field Details
-
low
private final int low -
high
private final int high
-
-
Constructor Details
-
RangedIntegerValidator
public RangedIntegerValidator(int low, int high)
-
-
Method Details
-
validate
Description 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:
IllegalArgumentException- if the value is invalid
-
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
-