Package org.jdesktop.beansbinding
Class Validator.Result
- java.lang.Object
-
- org.jdesktop.beansbinding.Validator.Result
-
public class Validator.Result extends java.lang.Object
An instance ofResult
is returned from aValidator's
validate
method to indicate an invalid value.A
Result
can contain an error code and/or description. These values are for your own reporting purposes and are not used internally.
-
-
Constructor Summary
Constructors Constructor Description Result(java.lang.Object errorCode, java.lang.String description)
Creates aResult
with the given error code and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Returns a description of the validation result, which may benull
.java.lang.Object
getErrorCode()
Returns the error code for the result, which may benull
.java.lang.String
toString()
Returns a string representation of theResult
.
-
-
-
Method Detail
-
getErrorCode
public java.lang.Object getErrorCode()
Returns the error code for the result, which may benull
.- Returns:
- the error code
-
getDescription
public java.lang.String getDescription()
Returns a description of the validation result, which may benull
.- Returns:
- the description
-
toString
public java.lang.String toString()
Returns a string representation of theResult
. This method is intended to be used for debugging purposes only, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not benull
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this
Result
-
-