|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.barbecue.Modulo10
Modulo 10 Check Sum class.
Method Summary | |
static int |
getMod10CheckDigit(java.lang.String data,
int weightOdd)
Calculates a modulo 10 check digit based on the passed numeric data. |
static int |
getMod10CheckDigit(java.lang.String data,
int weightEven,
int weightOdd)
Calculates a modulo 10 check digit based on the passed numeric data. |
static int |
getMod10CheckDigit(java.lang.String data,
int weightEven,
int weightOdd,
boolean beginsEven)
Calculates a modulo 10 check digit based on the passed numeric data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int getMod10CheckDigit(java.lang.String data, int weightEven, int weightOdd, boolean beginsEven) throws java.lang.NumberFormatException
data
- The data to encode into a Modulo 10 check digitweightEven
- Every even digit will be multiplied by this valueweightOdd
- Every odd digit will be multiplied by this valuebeginsEven
- true if the first numeric data is to be treated as even,
false if the first digit is to be treated as odd
java.lang.NumberFormatException
getMod10CheckDigit(String, int, int)
,
getMod10CheckDigit(String, int)
public static int getMod10CheckDigit(java.lang.String data, int weightEven, int weightOdd) throws java.lang.NumberFormatException
data
- The data to encode into a Modulo 10 check digitweightEven
- Every even digit will be multiplied by this valueweightOdd
- Every odd digit will be multiplied by this value
false if the first digit is to be treated as odd
java.lang.NumberFormatException
getMod10CheckDigit(String, int)
public static int getMod10CheckDigit(java.lang.String data, int weightOdd) throws java.lang.NumberFormatException
data
- The data to encode into a Modulo 10 check digitweightOdd
- Every odd digit will be multiplied by this value
java.lang.NumberFormatException
getMod10CheckDigit(String, int, int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |