List of usage examples for org.apache.commons.validator.routines.checkdigit CheckDigit calculate
public String calculate(String code) throws CheckDigitException;
From source file:com.inkubator.common.util.CheckDigitLunh.java
/** * Calculate a number for the check digit * @param code/* w w w . ja va 2 s .c om*/ * @return String code of check digit * @throws org.apache.commons.validator.routines.checkdigit.CheckDigitException */ public static String calculate(String code) throws CheckDigitException { CheckDigit checkDigit = new LuhnCheckDigit(); return checkDigit.calculate(code); }