ValidationResult.java :  » Development » jReform » org » jreform » internal » Java Open Source

Java Open Source » Development » jReform 
jReform » org » jreform » internal » ValidationResult.java
package org.jreform.internal;

/**
 * The result of a validation operation by a {@link ValueAttributeValidator}.
 * 
 * @author armandino (at) gmail.com
 */
class ValidationResult<T>
{
    private T parsedValue;
    private boolean isValid;
    private String errorMessage;
    
    ValidationResult(T parsedValue, boolean isValid, String errorMessage)
    {
        this.parsedValue = parsedValue;
        this.isValid = isValid;
        this.errorMessage = errorMessage;
    }
    
    T getParsedValue()
    {
        return parsedValue;
    }
    
    boolean isValid()
    {
        return isValid;
    }
    
    String getErrorMessage()
    {
        return errorMessage;
    }
    
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.