Class Binding.ValueResult<V>

java.lang.Object
org.jdesktop.beansbinding.Binding.ValueResult<V>
Enclosing class:
Binding<SS,SV,TS,TV>

public static final class Binding.ValueResult<V> extends Object
Encapsulates the result from calling Binding.getSourceValueForTarget() or Binding.getTargetValueForSource(), which can either be a successful value or a failure.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this ValueResult represents a failure and false otherwise.
    Returns the failure if this ValueResult represents a failure and throws UnsupportedOperationException otherwise.
    Returns the resulting value if this ValueResult does not represent a failure and throws UnsupportedOperationException otherwise.
    Returns a string representation of the ValueResult.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • failed

      public boolean failed()
      Returns true if this ValueResult represents a failure and false otherwise.
      Returns:
      true if this ValueResult represents a failure and false otherwise
      See Also:
    • getValue

      public V getValue()
      Returns the resulting value if this ValueResult does not represent a failure and throws UnsupportedOperationException otherwise.
      Returns:
      the resulting value
      Throws:
      UnsupportedOperationException - if this ValueResult represents a failure
      See Also:
    • getFailure

      public Binding.SyncFailure getFailure()
      Returns the failure if this ValueResult represents a failure and throws UnsupportedOperationException otherwise.
      Returns:
      the failure
      Throws:
      UnsupportedOperationException - if this ValueResult does not represent a failure
      See Also:
    • toString

      public String toString()
      Returns a string representation of the 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.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this ValueResult