public static final class Binding.ValueResult<V>
extends java.lang.Object
Binding.getSourceValueForTarget()
or
Binding.getTargetValueForSource()
, which
can either be a successful value or a failure.Modifier and Type | Method and Description |
---|---|
boolean |
failed()
Returns
true if this ValueResult represents
a failure and false otherwise. |
Binding.SyncFailure |
getFailure()
Returns the failure if this
ValueResult represents
a failure and throws UnsupportedOperationException
otherwise. |
V |
getValue()
Returns the resulting value if this
ValueResult does
not represent a failure and throws UnsupportedOperationException
otherwise. |
java.lang.String |
toString()
Returns a string representation of the
ValueResult . |
public boolean failed()
true
if this ValueResult
represents
a failure and false
otherwise.true
if this ValueResult
represents
a failure and false
otherwisegetFailure()
public V getValue()
ValueResult
does
not represent a failure and throws UnsupportedOperationException
otherwise.java.lang.UnsupportedOperationException
- if this ValueResult
represents a failurefailed()
public Binding.SyncFailure getFailure()
ValueResult
represents
a failure and throws UnsupportedOperationException
otherwise.java.lang.UnsupportedOperationException
- if this ValueResult
does not represent a failurefailed()
public java.lang.String toString()
ValueResult
. 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
be null
.toString
in class java.lang.Object
ValueResult