|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.thc.shagg.algorithms.Modulus10Algorithm | +--org.thc.shagg.algorithms.Modulus10AlgorithmBasic
The basic or typical implementation of the Modulus 10 Algorithm. The elements are added using a simple "+" and the check digit is the last digit of the sequence.
Fields inherited from class org.thc.shagg.algorithms.Modulus10Algorithm |
type |
Constructor Summary | |
Modulus10AlgorithmBasic()
|
Method Summary | |
int |
mod10Add(int[] sequence,
int[] weights,
int index)
Add method for the Modulus 10 Algorithm. |
int |
mod10checkDigit(int[] sequence)
Check method for the Modulus 10 Algorithm. |
Methods inherited from class org.thc.shagg.algorithms.Modulus10Algorithm |
check, getCheckDigitPosition, getName, getSymbol, usesWeights |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Modulus10AlgorithmBasic()
Method Detail |
public int mod10Add(int[] sequence, int[] weights, int index)
mod10Add
in class Modulus10Algorithm
sequence
- Integer sequence representing the digits to check,
not necessary between 0 and 9.weights
- Integer sequence of the weights to use, may be of
any length.index
- Current indexpublic int mod10checkDigit(int[] sequence)
mod10checkDigit
in class Modulus10Algorithm
sequence
- Integer sequence representing the digits to check,
not necessary between 0 and 9.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |