public class PESELValidator extends ModCheckBase implements ConstraintValidator<PESEL,CharSequence>
PESEL
.Constructor and Description |
---|
PESELValidator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(PESEL constraintAnnotation)
Initializes the validator in preparation for
ConstraintValidator.isValid(Object, ConstraintValidatorContext) calls. |
boolean |
isCheckDigitValid(List<Integer> digits,
char checkDigit) |
extractDigit, initialize, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public void initialize(PESEL constraintAnnotation)
ConstraintValidator
ConstraintValidator.isValid(Object, ConstraintValidatorContext)
calls.
The constraint annotation for a given constraint declaration
is passed.
This method is guaranteed to be called before any use of this instance for validation.
The default implementation is a no-op.
initialize
in interface ConstraintValidator<PESEL,CharSequence>
constraintAnnotation
- annotation instance for a given constraint declarationpublic boolean isCheckDigitValid(List<Integer> digits, char checkDigit)
isCheckDigitValid
in class ModCheckBase
Copyright © 2021 JBoss by Red Hat. All rights reserved.