|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.formproc.validation.RuleResult
The RuleResult class encapsulates a result of a validation against a Rule. Clients can use the isValid() method to determine if the value was validated against the rule.
| Constructor Summary | |
RuleResult()
Construct a new RuleResult with valid set to true. |
|
RuleResult(java.lang.String errorMessage)
Construct a new RuleResult with valid set to false and with the given error message. |
|
RuleResult(java.lang.Throwable error)
Construct a new RuleResult with valid set to false and with the given Throwable error. |
|
RuleResult(java.lang.Throwable error,
java.lang.String errorMessage)
Construct a new RuleResult with valid set to false and with the given Throwable error and error message. |
|
| Method Summary | |
java.lang.Throwable |
getError()
Get the error thrown by the rule. |
java.lang.String |
getErrorMessage()
Get the error message. |
boolean |
isValid()
Return true if the value is valid against the target rule. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RuleResult()
public RuleResult(java.lang.String errorMessage)
errorMessage - An error messagepublic RuleResult(java.lang.Throwable error)
error - A Throwable
public RuleResult(java.lang.Throwable error,
java.lang.String errorMessage)
error - A ThrowableerrorMessage - The error message| Method Detail |
public boolean isValid()
public java.lang.String getErrorMessage()
public java.lang.Throwable getError()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||