|
ThinkUI Data Generator 1.0.2 API | |||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectthinkui.datagen.util.Luhn
Implement the Luhn algorithm for checking validitity of values such as: SIN, credit card numbers, etc.
| Constructor Summary | |
Luhn()
|
|
| Method Summary | |
static int |
calcRemainder(java.lang.String number)
Compute the remainder of the remainder of the number according to the Luhn algorithm. |
static boolean |
isValid(java.lang.String number)
Checks whether a string of digits is valid according to the Luhn algorithm. |
static void |
main(java.lang.String[] args)
Main entry point for the test harness. |
static java.lang.String |
makeValid(java.lang.String number)
Checks whether a string of digits is valid according to the Luhn algorithm. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Luhn()
| Method Detail |
public static final int calcRemainder(java.lang.String number)
number - the String of digits to compute the Luhn remainder.
public static final boolean isValid(java.lang.String number)
number - the String of digits to validate according the Luhn remainder.public static final void main(java.lang.String[] args)
args - the command line arguments.public static final java.lang.String makeValid(java.lang.String number)
number - the String of digits to validate according the Luhn remainder.
|
ThinkUI Data Generator 1.0.2 API | |||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
Copyright © 2007-2009. ThinkUI Software Inc. All rights reserved.