public class NumberChecker extends CodeValidation
| Modifier and Type | Field and Description |
|---|---|
static int |
ANY_DECIMALS
The Constant ANY_DECIMALS.
|
static int |
FOUR_DECIMALS
The Constant FOUR_DECIMALS.
|
static int |
INTEGER
The Constant INTEGER.
|
static int |
TWO_DECIMALS
The Constant TWO_DECIMALS.
|
protected int |
type
The type of checker: INTEGER, ANY_DECIMALS, TWO_DECIMALS, FOUR_DECIMALS.
|
| Constructor and Description |
|---|
NumberChecker(int type)
Creates a specific number checker.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid(String code)
Checks if a specific code is valid.
|
check, isLowercase, isNumeric, isUppercasepublic static final int INTEGER
public static final int ANY_DECIMALS
public static final int TWO_DECIMALS
public static final int FOUR_DECIMALS
protected int type
public NumberChecker(int type)
type - the type of checker that needs to be created:
INTEGER, ANY_DECIMALS, TWO_DECIMALS, or FOUR_DECIMALSpublic boolean isValid(String code)
CodeValidationisValid in class CodeValidationcode - the value you want to checkCopyright © 1998–2018 iText Group NV. All rights reserved.