public class DecimalMaxValidatorForString extends Object implements ConstraintValidator<DecimalMax,String>
Constructor and Description |
---|
DecimalMaxValidatorForString() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(DecimalMax maxValue)
Initialize the validator in preparation for isValid calls.
|
boolean |
isValid(String value,
ConstraintValidatorContext constraintValidatorContext)
Implement the validation logic.
|
public void initialize(DecimalMax maxValue)
ConstraintValidator
initialize
in interface ConstraintValidator<DecimalMax,String>
maxValue
- annotation instance for a given constraint declarationpublic boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext)
ConstraintValidator
value
must not be altered.
This method can be accessed concurrently, thread-safety must be ensured
by the implementation.isValid
in interface ConstraintValidator<DecimalMax,String>
value
- object to validateconstraintValidatorContext
- context in which the constraint is evaluatedvalue
does not pass the constraintCopyright © 2012 JBoss by Red Hat. All Rights Reserved.