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