Package org.apache.commons.validator
Class ValidatorResult.ResultStatus
java.lang.Object
org.apache.commons.validator.ValidatorResult.ResultStatus
- All Implemented Interfaces:
Serializable
- Enclosing class:
ValidatorResult
Contains the status of the validation.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResultStatus
(boolean valid, Object result) Construct a Result status.ResultStatus
(ValidatorResult ignored, boolean valid, Object result) Deprecated. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
valid
private boolean valid -
result
-
-
Constructor Details
-
ResultStatus
Construct a Result status.- Parameters:
valid
- Whether the validator passed or failed.result
- Value returned by the validator.
-
ResultStatus
Deprecated.UseResultStatus(boolean, Object)
insteadProvided for backwards binary compatibility only.- Parameters:
ignored
- ignored by this methodvalid
- Whether the validator passed or failed.result
- Value returned by the validator.
-
-
Method Details
-
isValid
public boolean isValid()Tests whether or not the validation passed.- Returns:
- true if the result was good.
-
setValid
public void setValid(boolean valid) Sets whether or not the validation passed.- Parameters:
valid
- Whether the validation passed.
-
getResult
Gets the result returned by a validation method. This can be used to retrieve to the correctly typed value of a date validation for example.- Returns:
- The value returned by the validation.
-
setResult
Sets the result returned by a validation method. This can be used to retrieve to the correctly typed value of a date validation for example.- Parameters:
result
- The value returned by the validation.
-
ResultStatus(boolean, Object)
instead