public class NumberChecker extends CodeValidation
Modifier and Type | Field | Description |
---|---|---|
static int |
ANY_DECIMALS |
|
static int |
FOUR_DECIMALS |
|
static int |
INTEGER |
|
static int |
TWO_DECIMALS |
|
protected int |
type |
The type of checker: INTEGER, ANY_DECIMALS, TWO_DECIMALS, FOUR_DECIMALS.
|
Constructor | Description |
---|---|
NumberChecker(int type) |
Creates a specific number checker.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
isValid(java.lang.String code) |
Checks if a specific code is valid.
|
check, isLowercase, isNumeric, isUppercase
public 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(java.lang.String code)
CodeValidation
isValid
in class CodeValidation
code
- the value you want to checkCopyright © 1998–2018. All rights reserved.