public abstract class CodeValidation extends Object
| Constructor and Description |
|---|
CodeValidation() |
| Modifier and Type | Method and Description |
|---|---|
String |
check(String code)
Checks if a specific code is valid.
|
boolean |
isLowercase(String code,
int chars)
Checks the length of a code and if a code consists of lowercase letters
from a to z.
|
boolean |
isNumeric(String code,
int digits)
Checks the length of a code and if a code consists of numbers only.
|
boolean |
isUppercase(String code,
int chars)
Checks the length of a code and if a code consists of uppercase letters
from A to Z.
|
abstract boolean |
isValid(String code)
Checks if a specific code is valid.
|
public abstract boolean isValid(String code)
code - the value you want to checkpublic String check(String code) throws InvalidCodeException
code - the value you want to checkInvalidCodeException - the invalid code exceptionpublic boolean isNumeric(String code, int digits)
code - the code that needs to be checkeddigits - the expected length of the codepublic boolean isUppercase(String code, int chars)
code - the code that needs to be checkedchars - the expected length of the codepublic boolean isLowercase(String code, int chars)
code - the code that needs to be checkedchars - the expected length of the codeCopyright © 1998–2018 iText Group NV. All rights reserved.