public class NumberChecker extends CodeValidation
Modifier and Type | Field and 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 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, 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_DECIMALS
public boolean isValid(String code)
CodeValidation
isValid
in class CodeValidation
code
- the value you want to check
Copyright © 1998–2019. All rights reserved.