public final class VerhoeffCheckDigit extends java.lang.Object implements CheckDigit, java.io.Serializable
Check digit calculation for numeric codes using a Dihedral Group of order 10.
See Wikipedia - Verhoeff algorithm for more details.
| Modifier and Type | Field and Description |
|---|---|
static CheckDigit |
VERHOEFF_CHECK_DIGIT
Singleton Verhoeff Check Digit instance
|
| Constructor and Description |
|---|
VerhoeffCheckDigit() |
public static final CheckDigit VERHOEFF_CHECK_DIGIT
public boolean isValid(java.lang.String code)
isValid in interface CheckDigitcode - The code to validatetrue if the check digit is valid,
otherwise falsepublic java.lang.String calculate(java.lang.String code)
throws CheckDigitException
calculate in interface CheckDigitcode - The code to calculate the Check Digit forCheckDigitException - if an error occurs calculating
the check digit for the specified codeCopyright © 2002-2013. All Rights Reserved.