public class SizeConstraint extends java.lang.Object implements ValidationConstraint<Size>
Constructor and Description |
---|
SizeConstraint() |
SizeConstraint(int min,
int max) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Size annotation)
Configures constraint from associated annotation.
|
int |
getMax() |
int |
getMin() |
boolean |
isValid(ValidationConstraintContext vcc,
java.lang.Object value)
Performs validation in context of target object on provided value.
|
void |
setMax(int max) |
void |
setMin(int min) |
static boolean |
validate(java.lang.Object value,
int min,
int max) |
public SizeConstraint()
public SizeConstraint(int min, int max)
public int getMin()
public void setMin(int min)
public int getMax()
public void setMax(int max)
public void configure(Size annotation)
ValidationConstraint
configure
in interface ValidationConstraint<Size>
public boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
ValidationConstraint
isValid
in interface ValidationConstraint<Size>
true
if validation passes, otherwise false
.public static boolean validate(java.lang.Object value, int min, int max)
Copyright © 2003-present Jodd Team