public class MinAgeValidator extends Object implements ConstraintValidator<MinAge,Date>
Modifier and Type | Field and Description |
---|---|
(package private) int |
minAge |
Constructor and Description |
---|
MinAgeValidator() |
Modifier and Type | Method and Description |
---|---|
private int |
getAge(Calendar birth) |
void |
initialize(MinAge constraint) |
boolean |
isValid(Date date,
ConstraintValidatorContext ctx) |
public void initialize(MinAge constraint)
initialize
in interface ConstraintValidator<MinAge,Date>
public boolean isValid(Date date, ConstraintValidatorContext ctx)
isValid
in interface ConstraintValidator<MinAge,Date>
private int getAge(Calendar birth)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.