Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.validator
Class ValidatorResult.ResultStatus

    java.lang.Object
      org.apache.commons.validator.ValidatorResult.ResultStatus

All Implemented Interfaces:
  Serializable

Enclosing class:
  ValidatorResult

    protected static class ValidatorResult.ResultStatus

extends Object
implements Serializable

Contains the status of the validation.

See Also:
  Serialized Form

Constructor Summary
`ValidatorResult.ResultStatus(boolean valid, Object result)` Construct a Result status.
`ValidatorResult.ResultStatus(ValidatorResult ignored, boolean valid, Object result)` Deprecated. Use `#ValidatorResult(boolean, Object)` instead

Method Summary
`Object` | `getResult()` Gets the result returned by a validation method.
`boolean` | `isValid()` Tests whether or not the validation passed.
`void` | `setResult(Object result)` Sets the result returned by a validation method.
`void` | `setValid(boolean valid)` Sets whether or not the validation passed.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ValidatorResult.ResultStatus

    public ValidatorResult.ResultStatus(boolean valid,
                                        Object result)

  Construct a Result status.

  Parameters:
    `valid` - Whether the validator passed or failed.
    `result` - Value returned by the validator.

### ValidatorResult.ResultStatus

    public ValidatorResult.ResultStatus(ValidatorResult ignored,
                                        boolean valid,
                                        Object result)

  Deprecated. Use `#ValidatorResult(boolean, Object)` instead

  Provided for backwards binary compatibility only

Method Detail

### isValid

    public boolean isValid()

  Tests whether or not the validation passed.

  Returns:
    true if the result was good.

### setValid

    public void setValid(boolean valid)

  Sets whether or not the validation passed.

  Parameters:
    `valid` - Whether the validation passed.

### getResult

    public Object getResult()

  Gets the result returned by a validation method. This can be used to retrieve to the correctly typed value of a date validation for example.

  Returns:
    The value returned by the validation.

### setResult

    public void setResult(Object result)

  Sets the result returned by a validation method. This can be used to retrieve to the correctly typed value of a date validation for example.

  Parameters:
    `result` - The value returned by the validation.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.