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, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public void initialize(ModCheck 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.initialize
in interface ConstraintValidator<ModCheck,CharSequence>
constraintAnnotation
- annotation instance for a given constraint declarationpublic boolean isCheckDigitValid(List<Integer> digits, char checkDigit)
isCheckDigitValid
in class ModCheckBase
digits
- 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 © 2017 JBoss by Red Hat. All rights reserved.