public abstract class RequiredValidator extends BaseValidator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHECK_NOT_NULL_MESSAGE
Default message for the validator.
|
static java.lang.String |
CHECK_NULL_MESSAGE
Default message for the validator.
|
private java.lang.Object |
value
Value to be checked.
|
Modifier | Constructor and Description |
---|---|
protected |
RequiredValidator(java.lang.Object aValue)
Creates new instance of validator.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getValue()
Returns value to be checked.
|
static RequiredValidator |
checkNotNull(java.lang.Object aValue)
Validates null value.
|
static RequiredValidator |
checkNull(java.lang.Object aValue)
Validates null value.
|
void |
setValue(java.lang.Object aValue)
Sets value to be checked.
|
protected boolean |
validateNotNull()
Checks if value is not null.
|
protected boolean |
validateNull()
Checks if value is null.
|
getMessage, isValid, setMessage, validate
aValue
- Value to be checkedaValue
- Value to be checkedaValue
- Text to be evaluatedaValue
- Text to be evaluated