Modifier and Type | Method and Description |
---|---|
int |
compute(String digits)
Computes the check digit value
|
String |
encode(String digits)
Add check digits to a string containing digits
|
int |
getDigit(String digits)
Extract just the check digit from an encoded string
|
String |
getNumber(String digits)
Extracts the raw data without the check digits
|
boolean |
verify(String digits)
Verify a string that has been encoded with a check digit
|
String encode(String digits)
digits
- the input data string containing only digits '0'-'9'boolean verify(String digits)
digits
- input digitsint compute(String digits)
digits
- - a string containing dataint getDigit(String digits)
digits
- input data containing check and data digitsCopyright © 2013–2014. All rights reserved.