public class SuspendableYes extends ValBase<java.lang.Boolean>
true, but is false
when suspended.| Constructor and Description |
|---|
SuspendableYes() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Boolean |
computeValue() |
protected Subscription |
connect()
Implementation of this method should start observing inputs.
|
boolean |
get() |
protected boolean |
isSuspended() |
EventStream<?> |
noes() |
Guard |
suspend()
Suspends this suspendable object.
|
EventStream<?> |
yeses() |
getValue, invalidate, newObserver, observeInputsaddObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, notifyObservers, notifyObservers, observe, removeObserver, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddInvalidationObserver, addListener, addListener, animate, animate, animate, animate, animate, animate, asList, asVar, changes, combine, combine, combine, combine, combine, conditionOn, conditionOn, conditionOnShowing, conditionOnShowing, constant, create, create, filter, filter, flatMap, flatMap, getOpt, getOrElse, getOrSupply, getOrThrow, ifPresent, invalidations, isEmpty, isPresent, map, map, mapDynamic, mapDynamic, observeChanges, observeChanges, observeInvalidations, observeInvalidations, orElse, orElse, orElseConst, orElseConst, pin, removeInvalidationObserver, removeListener, removeListener, selectVar, selectVar, selectVar, selectVar, showingProperty, suspendable, suspendable, values, wrapaddObserver, observe, removeObservercombine, suspendWhen, suspendWhile, suspendWhiledefaultNotificationAccumulatordefaultEquals, defaultHashCode, defaultToString, notifyObserverspublic boolean get()
public final Guard suspend()
SuspendableIn 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.
suspend in interface SuspendableThe returned Guard is AutoCloseable, which makes it
convenient to use in try-with-resources.
public EventStream<?> yeses()
public EventStream<?> noes()
protected final boolean isSuspended()
protected final Subscription connect()
ValBaseValBase.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.protected final java.lang.Boolean computeValue()
computeValue in class ValBase<java.lang.Boolean>