Class VATidSICheckDigit
java.lang.Object
org.apache.commons.validator.routines.checkdigit.ModulusCheckDigit
org.apache.commons.validator.routines.checkdigit.Modulus11iWeightCheckDigit
org.apache.commons.validator.routines.checkdigit.VATidSICheckDigit
- All Implemented Interfaces:
Serializable,CheckDigit
Slovenian TIN and VAT identification number (VATIN) Check Digit calculation/validation.
davčna številka (DDV)
See Wikipedia - VAT IN for more details.
- Since:
- 1.10.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic CheckDigitGets the singleton instance of this validator.protected StringtoCheckDigit(int charValue) Convert an integer value to a check digit.Methods inherited from class org.apache.commons.validator.routines.checkdigit.Modulus11iWeightCheckDigit
isValid, weightedValueMethods inherited from class org.apache.commons.validator.routines.checkdigit.ModulusCheckDigit
calculate, calculateModulus, getCheckdigitLength, getModulus, sumDigits, toInt
-
Method Details
-
getInstance
Gets the singleton instance of this validator.- Returns:
- A singleton instance of the class.
-
toCheckDigit
Convert an integer value to a check digit.Note: this implementation only handles single-digit numeric values For non-numeric characters, override this method to provide integer-->character conversion.
Override to handle charValue 10.
Override because charValue 0 is an invalid check digit value and X is mapped to 0.
- Overrides:
toCheckDigitin classModulus11iWeightCheckDigit- Parameters:
charValue- The integer value of the character- Returns:
- The converted character
- Throws:
CheckDigitException- if integer character value doesn't represent a numeric character
-