org.apache.commons.validator
Class ValidatorResult.ResultStatus
java.lang.Objectorg.apache.commons.validator.ValidatorResult.ResultStatus
- ValidatorResult
- Serializable
protected class ValidatorResult.ResultStatus
extends java.lang.Object
implements Serializable
Contains the status of the validation.
ResultStatus(boolean valid, Object result)- Construct a Result status.
|
Object | getResult()- Gets the result returned by a validation method.
|
boolean | isValid()- Tests whether or not the validation passed.
|
void | setResult(Object result)- Sets the result returned by a validation method.
|
void | setValid(boolean valid)- Sets whether or not the validation passed.
|
result
private Object result
valid
private boolean valid
ResultStatus
public ResultStatus(boolean valid,
Object result) Construct a Result status.
valid - Whether the validator passed or failed.result - Value returned by the validator.
getResult
public Object 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.
- The value returned by the validation.
isValid
public boolean isValid()
Tests whether or not the validation passed.
- true if the result was good.
setResult
public void setResult(Object result)
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.
result - The value returned by the validation.
setValid
public void setValid(boolean valid)
Sets whether or not the validation passed.
valid - Whether the validation passed.
Copyright (c) 2001-2004 Apache Software Foundation