org.springmodules.validation.util.condition.range
Class BetweenIncludingUpperBoundCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.NonNullAcceptingCondition
org.springmodules.validation.util.condition.range.AbstractRangeCondition
org.springmodules.validation.util.condition.range.AbstractBetweenCondition
org.springmodules.validation.util.condition.range.BetweenIncludingUpperBoundCondition
- All Implemented Interfaces:
- Condition
public class BetweenIncludingUpperBoundCondition
- extends AbstractBetweenCondition
An AbstractBetweenCondition
implementation that checks whether the checked value is greater than the lower
bound and smaller than or equals the upper bound.
- Author:
- Uri Boness
Method Summary |
protected boolean |
checkRange(Object value,
Comparator comparator)
Checks whether the given value is greater than the lower bound and smaller than or equals the upper bound. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BetweenIncludingUpperBoundCondition
public BetweenIncludingUpperBoundCondition(Comparable lowerBound,
Comparable upperBound)
- Constructs a new BetweenIncludingUpperBoundCondition with given lower and upper bounds.
- Parameters:
lowerBound
- The lower bound.upperBound
- The higher bound.
BetweenIncludingUpperBoundCondition
public BetweenIncludingUpperBoundCondition(Object lowerBound,
Object upperBound,
Comparator comparator)
- Constructs a new BetweenIncludingUpperBoundCondition with given lower and upper bounds and the comparator to be
used to compare the checked value.
- Parameters:
lowerBound
- The lower bound.upperBound
- The upper bound.comparator
- The comparator.
checkRange
protected boolean checkRange(Object value,
Comparator comparator)
- Checks whether the given value is greater than the lower bound and smaller than or equals the upper bound.
- Specified by:
checkRange
in class AbstractRangeCondition
- Parameters:
value
- The value to be compared.comparator
- The comparator to be used to compare the checked value.
- Returns:
true
if the value is within the range, false
otherwise.
Copyright © 2009. All Rights Reserved.