jodd.vtor.constraint
Class MaxConstraint

java.lang.Object
  extended by jodd.vtor.constraint.MaxConstraint
All Implemented Interfaces:
ValidationConstraint<Max>

public class MaxConstraint
extends java.lang.Object
implements ValidationConstraint<Max>


Field Summary
protected  double max
           
 
Constructor Summary
MaxConstraint()
           
MaxConstraint(double max)
           
 
Method Summary
 void configure(Max annotation)
          Configures constraint from associated annotation.
 double getMax()
           
 boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
          Performs validation in context of target object on provided value.
 void setMax(double max)
           
static boolean validate(java.lang.Object value, double max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

max

protected double max
Constructor Detail

MaxConstraint

public MaxConstraint()

MaxConstraint

public MaxConstraint(double max)
Method Detail

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,
                       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<Max>
Returns:
true if validation passes, otherwise false.

validate

public static boolean validate(java.lang.Object value,
                               double max)


Copyright © 2003-2011 Jodd Team