Class SuspendableYes

All Implemented Interfaces:
javafx.beans.Observable, javafx.beans.value.ObservableBooleanValue, javafx.beans.value.ObservableValue<Boolean>, Observable<Consumer<? super Boolean>>, ProperObservable<Consumer<? super Boolean>, Boolean>, Suspendable, Toggle, ProperVal<Boolean>, Val<Boolean>

public class SuspendableYes extends ValBase<Boolean>
Observable boolean value that is normally true, but is false when suspended.
  • Constructor Details

    • SuspendableYes

      public SuspendableYes()
  • Method Details

    • get

      public boolean get()
    • suspend

      public final Guard suspend()
      Description copied from interface: Suspendable
      Suspends this suspendable object.

      In case of suspendable Observable, suspends notification delivery for this observable object. Notifications produced while suspended may be queued for later delivery, accumulated into a single cumulative notification, or discarded completely, depending on the concrete implementation.

      Specified by:
      suspend in interface Suspendable
      Returns:
      a Guard instance that can be released to end suspension. In case of suspended notifications, releasing the returned Guard will trigger delivery of queued or accumulated notifications, if any.

      The returned Guard is AutoCloseable, which makes it convenient to use in try-with-resources.

    • yeses

      public EventStream<?> yeses()
    • noes

      public EventStream<?> noes()
    • isSuspended

      protected final boolean isSuspended()
    • connect

      protected final Subscription connect()
      Description copied from class: ValBase
      Implementation of this method should start observing inputs. If the value of this Val may change as a result of input change, the corresponding input observer should call ValBase.invalidate() to notify observers of this Val. By the time of calling ValBase.invalidate(), the input observer must have already updated any internal state of this Val, so that a subsequent call to ValBase.computeValue() returns the current value of this Val.
      Specified by:
      connect in class ValBase<Boolean>
      Returns:
      Subscription that can be used to stop observing inputs.
    • computeValue

      protected final Boolean computeValue()
      Specified by:
      computeValue in class ValBase<Boolean>