Class NumberChecker
java.lang.Object
com.itextpdf.text.zugferd.checkers.CodeValidation
com.itextpdf.text.zugferd.checkers.NumberChecker
Provide a means to check if a String consist of characters from 0 to 9
and a decimal point in case a decimal is expected.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
protected int
The type of checker: INTEGER, ANY_DECIMALS, TWO_DECIMALS, FOUR_DECIMALS. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.itextpdf.text.zugferd.checkers.CodeValidation
check, isLowercase, isNumeric, isUppercase
-
Field Details
-
INTEGER
public static final int INTEGER- See Also:
-
ANY_DECIMALS
public static final int ANY_DECIMALS- See Also:
-
TWO_DECIMALS
public static final int TWO_DECIMALS- See Also:
-
FOUR_DECIMALS
public static final int FOUR_DECIMALS- See Also:
-
type
protected int typeThe type of checker: INTEGER, ANY_DECIMALS, TWO_DECIMALS, FOUR_DECIMALS.
-
-
Constructor Details
-
NumberChecker
public NumberChecker(int type) Creates a specific number checker.- Parameters:
type
- the type of checker that needs to be created: INTEGER, ANY_DECIMALS, TWO_DECIMALS, or FOUR_DECIMALS
-
-
Method Details
-
isValid
Description copied from class:CodeValidation
Checks if a specific code is valid.- Specified by:
isValid
in classCodeValidation
- Parameters:
code
- the value you want to check- Returns:
- true if the code is valid
-