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 TypeMethodDescriptionboolean
failed()
Returnstrue
if thisValueResult
represents a failure andfalse
otherwise.Returns the failure if thisValueResult
represents a failure and throwsUnsupportedOperationException
otherwise.getValue()
Returns the resulting value if thisValueResult
does not represent a failure and throwsUnsupportedOperationException
otherwise.toString()
Returns a string representation of theValueResult
.
-
Method Details
-
failed
public boolean failed()Returnstrue
if thisValueResult
represents a failure andfalse
otherwise.- Returns:
true
if thisValueResult
represents a failure andfalse
otherwise- See Also:
-
getValue
Returns the resulting value if thisValueResult
does not represent a failure and throwsUnsupportedOperationException
otherwise.- Returns:
- the resulting value
- Throws:
UnsupportedOperationException
- if thisValueResult
represents a failure- See Also:
-
getFailure
Returns the failure if thisValueResult
represents a failure and throwsUnsupportedOperationException
otherwise.- Returns:
- the failure
- Throws:
UnsupportedOperationException
- if thisValueResult
does 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
.
-