Mod10CheckValidator and Mod11CheckValidator@Deprecated public class ModCheckValidator extends ModCheckBase implements ConstraintValidator<ModCheck,CharSequence>
| Constructor and Description |
|---|
ModCheckValidator()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(ModCheck constraintAnnotation)
Deprecated.
Initializes the validator in preparation for
ConstraintValidator.isValid(Object, ConstraintValidatorContext) calls. |
boolean |
isCheckDigitValid(List<Integer> digits,
char checkDigit)
Deprecated.
Check if the input passes the Mod10 (Luhn algorithm implementation only) or Mod11 test
|
extractDigit, initialize, isValidclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisValidpublic void initialize(ModCheck constraintAnnotation)
ConstraintValidatorConstraintValidator.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<ModCheck,CharSequence>constraintAnnotation - annotation instance for a given constraint declarationpublic boolean isCheckDigitValid(List<Integer> digits, char checkDigit)
isCheckDigitValid in class ModCheckBasedigits - the digits over which to calculate the Mod10 or Mod11 checksumcheckDigit - the check digittrue if the mod 10/11 result matches the check digit, false otherwiseCopyright © 2018 JBoss by Red Hat. All rights reserved.