FileDocCategorySizeDatePackage
ValidatorResult.javaAPI DocGlassfish v2 API3609Fri May 04 22:34:10 BST 2007com.sun.enterprise.admin.util

ValidatorResult

public class ValidatorResult extends Object implements Serializable
Represents the result of validation by an IValidator.

Fields Summary
private final boolean
mValid
private final String
mMsg
public static final ValidatorResult
kValid
Constructors Summary
public ValidatorResult(boolean valid, String msg)
Constructor intended for non-public use by Assert.


                       
          
    
        mValid	= valid;

        // keep message only if invalid (convenience for caller)
        mMsg	= valid ? null : msg;
    
protected ValidatorResult()
Constructor indicates validation succeeded.

        mValid	= true;
        mMsg	= null;
    
Methods Summary
public java.lang.StringgetString()
Return a String describing the validation failure. A null will be returned if there was no failure.

returns
validation failure String (may be null if no failure)

        return( mMsg );
    
public booleanisValid()
Return True if valid, false otherwise.

returns
true if valid, false otherwise

        return( mValid );
    
public java.lang.StringtoString()
Represent as a String

        String	result	= null;

        if ( mValid )
        {
            result	= "valid";
        }
        else
        {
            result	= "INVALID = " + getString();
        }

        return( result );