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