jodd.vtor.constraint
Class RangeConstraint
java.lang.Object
jodd.vtor.constraint.RangeConstraint
- All Implemented Interfaces:
- ValidationConstraint<Range>
public class RangeConstraint
- extends java.lang.Object
- implements ValidationConstraint<Range>
|
Field Summary |
protected double |
max
|
protected double |
min
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
min
protected double min
max
protected double max
RangeConstraint
public RangeConstraint()
RangeConstraint
public RangeConstraint(double min,
double max)
getMin
public double getMin()
setMin
public void setMin(double min)
getMax
public double getMax()
setMax
public void setMax(double max)
configure
public void configure(Range annotation)
- Description copied from interface:
ValidationConstraint
- Configures constraint from associated annotation.
- Specified by:
configure in interface ValidationConstraint<Range>
isValid
public boolean isValid(ValidationConstraintContext vcc,
java.lang.Object value)
- Description copied from interface:
ValidationConstraint
- Performs validation in context of target object on provided value.
- Specified by:
isValid in interface ValidationConstraint<Range>
- Returns:
true if validation passes, otherwise false.
validate
public static boolean validate(java.lang.Object value,
double min,
double max)
Copyright © 2003-2011 Jodd Team