Class Modulus11iBSNCheckDigit

All Implemented Interfaces:
Serializable, CheckDigit
Direct Known Subclasses:
Modulus11iLeftCheckDigit, VATidNLCheckDigit

public class Modulus11iBSNCheckDigit extends Modulus11iWeightCheckDigit
Check digit calculation based on modulus 11 and weights based on the digit position.

Digits are weighted based by their position, from right to left like is the super class. The difference to i-weighted super class is how the check digit is calculated. Here the check digit is modulus 11 of the weighted sum. In super however the check digit is (11 - modulusResult) % 11

This module is used to calculate the TIN_NL Burgerservicenummer (BSN) check digits. See Wikipedia for more details.

Since:
2.10.5
See Also:
  • Method Details

    • getInstance

      public static CheckDigit getInstance()
      Gets the singleton instance of this validator.
      Returns:
      A singleton instance of the class.
    • calculate

      public String calculate(String code) throws CheckDigitException
      Calculate a modulus Check Digit for a code which does not yet have one.
      Specified by:
      calculate in interface CheckDigit
      Overrides:
      calculate in class ModulusCheckDigit
      Parameters:
      code - The code for which to calculate the Check Digit; the check digit should not be included
      Returns:
      The calculated Check Digit
      Throws:
      CheckDigitException - if an error occurs calculating the check digit