Class Binding.ValueResult<V>
java.lang.Object
org.jdesktop.beansbinding.Binding.ValueResult<V>
Encapsulates the result from calling
Binding.getSourceValueForTarget() or
Binding.getTargetValueForSource(), which
can either be a successful value or a failure.-
Method Summary
Modifier and TypeMethodDescriptionbooleanfailed()Returnstrueif thisValueResultrepresents a failure andfalseotherwise.Returns the failure if thisValueResultrepresents a failure and throwsUnsupportedOperationExceptionotherwise.getValue()Returns the resulting value if thisValueResultdoes not represent a failure and throwsUnsupportedOperationExceptionotherwise.toString()Returns a string representation of theValueResult.
-
Method Details
-
failed
public boolean failed()Returnstrueif thisValueResultrepresents a failure andfalseotherwise.- Returns:
trueif thisValueResultrepresents a failure andfalseotherwise- See Also:
-
getValue
Returns the resulting value if thisValueResultdoes not represent a failure and throwsUnsupportedOperationExceptionotherwise.- Returns:
- the resulting value
- Throws:
UnsupportedOperationException- if thisValueResultrepresents a failure- See Also:
-
getFailure
Returns the failure if thisValueResultrepresents a failure and throwsUnsupportedOperationExceptionotherwise.- Returns:
- the failure
- Throws:
UnsupportedOperationException- if thisValueResultdoes not represent a failure- See Also:
-
toString
Returns a string representation of theValueResult. 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.
-