jodd.vtor.constraint
Class MinLengthConstraint

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

public class MinLengthConstraint
extends java.lang.Object
implements ValidationConstraint<MinLength>


Field Summary
protected  int min
           
 
Constructor Summary
MinLengthConstraint()
           
MinLengthConstraint(int min)
           
 
Method Summary
 void configure(MinLength annotation)
          Configures constraint from associated annotation.
 int getMin()
           
 boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
          Performs validation in context of target object on provided value.
 void setMin(int min)
           
static boolean validate(java.lang.Object value, int min)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

min

protected int min
Constructor Detail

MinLengthConstraint

public MinLengthConstraint()

MinLengthConstraint

public MinLengthConstraint(int min)
Method Detail

getMin

public int getMin()

setMin

public void setMin(int min)

configure

public void configure(MinLength annotation)
Description copied from interface: ValidationConstraint
Configures constraint from associated annotation.

Specified by:
configure in interface ValidationConstraint<MinLength>

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

validate

public static boolean validate(java.lang.Object value,
                               int min)


Copyright © 2003-2011 Jodd Team