public class AssertTrueValidator extends Object implements ConstraintValidator<AssertTrue,Boolean>
Constructor and Description |
---|
AssertTrueValidator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(AssertTrue constraintAnnotation)
Initialize the validator in preparation for isValid calls.
|
boolean |
isValid(Boolean bool,
ConstraintValidatorContext constraintValidatorContext)
Implement the validation logic.
|
public void initialize(AssertTrue constraintAnnotation)
ConstraintValidator
initialize
in interface ConstraintValidator<AssertTrue,Boolean>
constraintAnnotation
- annotation instance for a given constraint declarationpublic boolean isValid(Boolean bool, 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<AssertTrue,Boolean>
bool
- object to validateconstraintValidatorContext
- context in which the constraint is evaluatedvalue
does not pass the constraintCopyright © 2012 JBoss by Red Hat. All Rights Reserved.