ValidatorResultpublic class ValidatorResult extends Object implements SerializableRepresents 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.String | getString()Return a String describing the validation failure. A null will
be returned if there was no failure.
return( mMsg );
| public boolean | isValid()Return True if valid, false otherwise.
return( mValid );
| public java.lang.String | toString()Represent as a String
String result = null;
if ( mValid )
{
result = "valid";
}
else
{
result = "INVALID = " + getString();
}
return( result );
|
|