org.hibernate.validator.internal.constraintvalidators

## Class Mod10CheckValidator

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

- All Implemented Interfaces:
    ConstraintValidator<Mod10Check,CharSequence>

      public class Mod10CheckValidator
      extends ModCheckBase
      implements ConstraintValidator<Mod10Check,CharSequence>

  Mod10 (Luhn algorithm implementation) Check validator http://en.wikipedia.org/wiki/Luhn_algorithm http://en.wikipedia.org/wiki/Check_digit
  Author:
    George Gastaldi, Hardy Ferentschik, Victor Rezende dos Santos

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Mod10CheckValidator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(Mod10Check constraintAnnotation)`
    `boolean` | `isCheckDigitValid(List<Integer> digits, char checkDigit)` Validate check digit using Mod10

    - ### 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

    - #### Mod10CheckValidator

          public Mod10CheckValidator()

  - ### Method Detail

    - #### initialize

          public void initialize(Mod10Check constraintAnnotation)

      Specified by:
        `initialize` in interface `ConstraintValidator<Mod10Check,CharSequence>`

    - #### isCheckDigitValid

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

      Validate check digit using Mod10
      Specified by:
        `isCheckDigitValid` in class `ModCheckBase`
      Parameters:
        `digits` - The digits over which to calculate the checksum
        `checkDigit` - the check digit
      Returns:
        `true` if the mod 10 result matches the check digit, `false` otherwise

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