01: package org.jreform.internal;
02:
03: /**
04: * The result of a validation operation by a {@link ValueAttributeValidator}.
05: *
06: * @author armandino (at) gmail.com
07: */
08: class ValidationResult<T> {
09: private T parsedValue;
10: private boolean isValid;
11: private String errorMessage;
12:
13: ValidationResult(T parsedValue, boolean isValid, String errorMessage) {
14: this .parsedValue = parsedValue;
15: this .isValid = isValid;
16: this .errorMessage = errorMessage;
17: }
18:
19: T getParsedValue() {
20: return parsedValue;
21: }
22:
23: boolean isValid() {
24: return isValid;
25: }
26:
27: String getErrorMessage() {
28: return errorMessage;
29: }
30:
31: }
|