org.hibernate.validator.internal.constraintvalidators

## Class ModCheckValidator

- java.lang.Object
- - org.hibernate.validator.internal.constraintvalidators.ModCheckBase
  - - org.hibernate.validator.internal.constraintvalidators.ModCheckValidator

- All Implemented Interfaces:
    ConstraintValidator<ModCheck,CharSequence>

  Deprecated.
  As of release 5.1.0, replaced by `Mod10CheckValidator` and `Mod11CheckValidator`

      @Deprecated
      public class ModCheckValidator
      extends ModCheckBase
      implements ConstraintValidator<ModCheck,CharSequence>

  Mod check validator for MOD10 and MOD11 algorithms http://en.wikipedia.org/wiki/Luhn_algorithm http://en.wikipedia.org/wiki/Check_digit
  Author:
    George Gastaldi, Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModCheckValidator()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(ModCheck constraintAnnotation)` Deprecated.
    `boolean` | `isCheckDigitValid(List<Integer> digits, char checkDigit)` Deprecated. Check if the input passes the Mod10 (Luhn algorithm implementation only) or Mod11 test

    - ### Methods inherited from class org.hibernate.validator.internal.constraintvalidators.ModCheckBase

      `extractDigit, initialize, isValid`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.validation.ConstraintValidator

      `isValid`

- - ### Constructor Detail

    - #### ModCheckValidator

          public ModCheckValidator()

      Deprecated.

  - ### Method Detail

    - #### initialize

          public void initialize(ModCheck constraintAnnotation)

      Deprecated.
      Specified by:
        `initialize` in interface `ConstraintValidator<ModCheck,CharSequence>`

    - #### isCheckDigitValid

          public boolean isCheckDigitValid(List<Integer> digits,
                                  char checkDigit)

      Deprecated.
      Check if the input passes the Mod10 (Luhn algorithm implementation only) or Mod11 test
      Specified by:
        `isCheckDigitValid` in class `ModCheckBase`
      Parameters:
        `digits` - the digits over which to calculate the Mod10 or Mod11 checksum
        `checkDigit` - the check digit
      Returns:
        `true` if the mod 10/11 result matches the check digit, `false` otherwise

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved