protected static class ValidatorResult.ResultStatus
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
result |
private static long |
serialVersionUID |
private boolean |
valid |
Constructor and Description |
---|
ResultStatus(boolean valid,
java.lang.Object result)
Construct a Result status.
|
ResultStatus(ValidatorResult ignored,
boolean valid,
java.lang.Object result)
Deprecated.
Use
ResultStatus(boolean, Object) instead |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getResult()
Gets the result returned by a validation method.
|
boolean |
isValid()
Tests whether or not the validation passed.
|
void |
setResult(java.lang.Object result)
Sets the result returned by a validation method.
|
void |
setValid(boolean valid)
Sets whether or not the validation passed.
|
private static final long serialVersionUID
private boolean valid
private java.lang.Object result
public ResultStatus(boolean valid, java.lang.Object result)
valid
- Whether the validator passed or failed.result
- Value returned by the validator.public ResultStatus(ValidatorResult ignored, boolean valid, java.lang.Object result)
ResultStatus(boolean, Object)
insteadignored
- ignored by this methodvalid
- Whether the validator passed or failed.result
- Value returned by the validator.public boolean isValid()
public void setValid(boolean valid)
valid
- Whether the validation passed.public java.lang.Object getResult()
public void setResult(java.lang.Object result)
result
- The value returned by the validation.