org.srplib.validation
Class ValueRangeValidator<T extends Comparable<T>>
java.lang.Object
org.srplib.validation.AbstractValidator<T>
org.srplib.validation.ValueRangeValidator<T>
- All Implemented Interfaces:
- Validator<T>
public class ValueRangeValidator<T extends Comparable<T>>
- extends AbstractValidator<T>
Checks if value is in specified range.
May be applied to any subtype of Comparable.
- Author:
- Anton Pechinsky
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueRangeValidator
public ValueRangeValidator(T lowerLimit,
T upperLimit)
- Creates value range validators.
- Parameters:
lowerLimit - lower limit (inclusive).upperLimit - upper limit (inclusive).
isValid
protected boolean isValid(Validatable<T> validatable)
- Specified by:
isValid in class AbstractValidator<T extends Comparable<T>>
newError
protected ValidationError newError()
- Specified by:
newError in class AbstractValidator<T extends Comparable<T>>
Copyright © 2012. All Rights Reserved.