Package com.example.common.validate
Class ValidateIntegerNumber
java.lang.Object
com.example.common.validate.BaseValidator
com.example.common.validate.ValidateIntegerNumber
- All Implemented Interfaces:
ValidatorInterface
The ValidateIntegerNumber class extends the BaseValidator class and implements the ValidatorInterface for
validating integer numbers.
-
Field Summary
Fields inherited from class com.example.common.validate.BaseValidator
value
-
Constructor Summary
ConstructorsConstructorDescriptionValidateIntegerNumber
(String value) Constructs a ValidateIntegerNumber object with the specified value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
validate()
Validates the value as an integer number using a regular expression pattern.
-
Constructor Details
-
ValidateIntegerNumber
Constructs a ValidateIntegerNumber object with the specified value.- Parameters:
value
- the value to validate as an integer number
-
-
Method Details
-
validate
public boolean validate()Validates the value as an integer number using a regular expression pattern.- Specified by:
validate
in interfaceValidatorInterface
- Returns:
- true if the value is a valid integer number, false otherwise
-