org.apache.bval.extras.constraints.checkdigit
Class VerhoeffValidator
java.lang.Object
org.apache.bval.extras.constraints.checkdigit.VerhoeffValidator
- All Implemented Interfaces:
- ConstraintValidator<Verhoeff,String>
public final class VerhoeffValidator
- extends Object
- implements ConstraintValidator<Verhoeff,String>
Verhoeff (Dihedral) Check Digit calculation/validation.
Check digit calculation for numeric codes using a
Dihedral Group
of order 10.
See Wikipedia
- Verhoeff algorithm for more details.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VerhoeffValidator
public VerhoeffValidator()
isValid
public boolean isValid(String code,
ConstraintValidatorContext context)
-
- Specified by:
isValid
in interface ConstraintValidator<Verhoeff,String>
initialize
public void initialize(Verhoeff iban)
-
- Specified by:
initialize
in interface ConstraintValidator<Verhoeff,String>
Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.