Interface IModulo<T>
-
- All Known Implementing Classes:
AbstractModulo,Modulo10,Modulo11
public interface IModulo<T>Defines the modulo digest api.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TcreateCheckDigit(java.lang.String data)Calculate the modulo of the given string.booleanvalidate(java.lang.String data)Validate a number if modulo is valid
-
-
-
Method Detail
-
validate
boolean validate(java.lang.String data)
Validate a number if modulo is valid- Parameters:
data- the number to be checked- Returns:
- true if it is valid; otherwise false
-
createCheckDigit
T createCheckDigit(java.lang.String data)
Calculate the modulo of the given string.- Parameters:
data- the data to parse- Returns:
- the modulo result
-
-