Class RangeValidator
java.lang.Object
org.apache.bookkeeper.common.conf.validators.RangeValidator
- All Implemented Interfaces:
Validator
Validator that validates a configuration value is in a numeric range.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RangeValidatorA numeric range that checks the lower bound.static RangeValidatorA numeric range that checks the upper bound.static RangeValidatorA numeric range that checks both lower and upper bounds.protected booleanReturn the documentation for a given validator.booleangetMax()getMin()inthashCode()toString()booleanValidates the configuration value.
-
Constructor Details
-
RangeValidator
-
-
Method Details
-
atLeast
A numeric range that checks the lower bound.- Parameters:
min- the minimum acceptable value- Returns:
- a numeric range that checks the lower bound
-
atMost
A numeric range that checks the upper bound.- Parameters:
max- the maximum acceptable value- Returns:
- a numeric range that checks the upper bound
-
between
A numeric range that checks both lower and upper bounds.- Parameters:
min- the minimum acceptable valuemax- the maximum acceptable value- Returns:
- a numeric range that checks both lower and upper bounds
-
validate
Description copied from interface:ValidatorValidates the configuration value. -
toString
-
documentation
Description copied from interface:ValidatorReturn the documentation for a given validator.- Specified by:
documentationin interfaceValidator- Returns:
- the documentation for a given validator
-
getMin
-
getMax
-
equals
-
canEqual
-
hashCode
public int hashCode()
-