Class TidDECheckDigit
java.lang.Object
org.apache.commons.validator.routines.checkdigit.ModulusCheckDigit
org.apache.commons.validator.routines.checkdigit.IsoIec7064HybridSystem
org.apache.commons.validator.routines.checkdigit.IsoIecHybrid1110System
org.apache.commons.validator.routines.checkdigit.TidDECheckDigit
- All Implemented Interfaces:
Serializable,CheckDigit,IsoIecConstants
German Steuer-Identifikationsnummer (TIN – in short: IdNr.) is available since 2008,
has a length of 11 digits and it applies to individual persons.
See Prüfung der Steuer- und Steueridentifikationsnummer (de) for more details.
- Since:
- 1.10.0
- See Also:
-
Field Summary
Fields inherited from interface org.apache.commons.validator.routines.checkdigit.IsoIecConstants
ALPHABETIC, ALPHABETIC23, ALPHANUMERIC, ALPHANUMERIC_PLUS_STAR, ALPHANUMERIC31, MODULUS_1271, MODULUS_23, MODULUS_31, MODULUS_37, MODULUS_661, MODULUS_97, NUMERIC, NUMERIC_PLUS_X, RADIX_10, RADIX_2, RADIX_26, RADIX_36 -
Method Summary
Modifier and TypeMethodDescriptionprotected intcalculateModulus(String code, boolean includesCheckDigit) Calculate the modulus for a code.static CheckDigitGets the singleton instance of this validator.Methods inherited from class org.apache.commons.validator.routines.checkdigit.IsoIecHybrid1110System
getCharacterSetMethods inherited from class org.apache.commons.validator.routines.checkdigit.IsoIec7064HybridSystem
calculate, isValid, toCheckDigit, toInt, weightedValueMethods inherited from class org.apache.commons.validator.routines.checkdigit.ModulusCheckDigit
getCheckdigitLength, getModulus, sumDigits
-
Method Details
-
getInstance
Gets the singleton instance of this validator.- Returns:
- A singleton instance of the class.
-
calculateModulus
Calculate the modulus for a code.Override to count ciphers to and check the criteria:
- The first 10 digits of the identification number must contain exactly one duplicate or triplicate digit.
- Are there three identical digits in positions 1 to 10, these identical digits must never be directly next to each other.
- Overrides:
calculateModulusin classIsoIec7064HybridSystem- Parameters:
code- The code to calculate the modulus for.includesCheckDigit- Whether the code includes the Check Digit or not.- Returns:
- The modulus value
- Throws:
CheckDigitException- if an error occurs calculating the modulus for the specified code
-