@Deprecated public abstract class CodeValidation extends Object
| Constructor and Description |
|---|
CodeValidation()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
check(String code)
Deprecated.
Checks if a specific code is valid.
|
boolean |
isLowercase(String code,
int chars)
Deprecated.
Checks the length of a code and if a code consists of lowercase letters
from a to z.
|
boolean |
isNumeric(String code,
int digits)
Deprecated.
Checks the length of a code and if a code consists of numbers only.
|
boolean |
isUppercase(String code,
int chars)
Deprecated.
Checks the length of a code and if a code consists of uppercase letters
from A to Z.
|
abstract boolean |
isValid(String code)
Deprecated.
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 - reveals the reason why the code isn't validpublic 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 © 2023. All rights reserved.