public class MaxConstraint extends java.lang.Object implements ValidationConstraint<Max>
Modifier and Type | Field and Description |
---|---|
protected double |
max |
Constructor and Description |
---|
MaxConstraint() |
MaxConstraint(double max) |
Modifier and Type | Method and Description |
---|---|
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) |
public MaxConstraint()
public MaxConstraint(double max)
public double getMax()
public void setMax(double max)
public void configure(Max annotation)
ValidationConstraint
configure
in interface ValidationConstraint<Max>
public boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
ValidationConstraint
isValid
in interface ValidationConstraint<Max>
true
if validation passes, otherwise false
.public static boolean validate(java.lang.Object value, double max)
Copyright © 2003-present Jodd Team