javax.beans.binding
Class ValidationResult

java.lang.Object
  extended by javax.beans.binding.ValidationResult

public class ValidationResult
extends java.lang.Object

A ValidationResult is returned from a BindingValidator to indicate the value is invalid, and describe what action to take.


Nested Class Summary
static class ValidationResult.Action
          An enumeration of the action the Binding should take.
 
Constructor Summary
ValidationResult(ValidationResult.Action type)
          Creates a ValidationResult of the specified type.
ValidationResult(ValidationResult.Action type, java.lang.String description, java.lang.Object errorCode)
          Creates a ValidationResult.
 
Method Summary
 java.lang.String getDescription()
          Returns a description of the validation result.
 java.lang.Object getErrorCode()
          Returns an identifier for the result.
 ValidationResult.Action getType()
          Returns the action the Binding should take.
 java.lang.String toString()
          Returns a string representing this ValidationResult.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationResult

public ValidationResult(ValidationResult.Action type)
Creates a ValidationResult of the specified type.

Parameters:
type - the action the Binding should take
Throws:
java.lang.IllegalArgumentException - if type is null

ValidationResult

public ValidationResult(ValidationResult.Action type,
                        java.lang.String description,
                        java.lang.Object errorCode)
Creates a ValidationResult.

Parameters:
type - the action the Binding should take
description - a textual description of this ValidationResult
errorCode - an identifier for this ValidationResult
Throws:
java.lang.IllegalArgumentException - if type is null
Method Detail

getType

public ValidationResult.Action getType()
Returns the action the Binding should take.

Returns:
the action

getErrorCode

public java.lang.Object getErrorCode()
Returns an identifier for the result.

Returns:
an identifier

getDescription

public java.lang.String getDescription()
Returns a description of the validation result.

Returns:
a description

toString

public java.lang.String toString()
Returns a string representing this ValidationResult. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this binding