Package org.reactfx
Class ToggleFromVal
java.lang.Object
- All Implemented Interfaces:
javafx.beans.Observable,javafx.beans.value.ObservableValue<Boolean>,Observable<Consumer<? super Boolean>>,Suspendable,Toggle,Val<Boolean>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadaptObserver(Consumer<? super Boolean> observer) Adapts the given observer to observer of the underlying Observable.getValue()suspend()Suspends this suspendable object.Methods inherited from class org.reactfx.ProxyObservable
addObserver, getUnderlyingObservable, observe, removeObserverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserverMethods inherited from interface org.reactfx.Suspendable
suspendWhen, suspendWhile, suspendWhileMethods inherited from interface org.reactfx.value.Val
addInvalidationObserver, addListener, addListener, animate, animate, asList, asVar, changes, conditionOn, conditionOnShowing, filter, flatMap, getOpt, getOrElse, getOrSupply, getOrThrow, ifPresent, invalidations, isEmpty, isPresent, map, mapDynamic, observeChanges, observeInvalidations, orElse, orElseConst, pin, removeInvalidationObserver, removeListener, removeListener, selectVar, selectVar, suspendable, values
-
Field Details
-
suspender
-
-
Constructor Details
-
ToggleFromVal
-
-
Method Details
-
getValue
- Specified by:
getValuein interfacejavafx.beans.value.ObservableValue<Boolean>
-
suspend
Description copied from interface:SuspendableSuspends 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:
suspendin interfaceSuspendable- 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
GuardisAutoCloseable, which makes it convenient to use in try-with-resources.
-
adaptObserver
Description copied from class:ProxyObservableAdapts the given observer to observer of the underlying Observable.Important: It is required that the transformation applied to two observers that are _equal_ yields two adapted observers that are _equal_. In other words, if `o1.equals(o2)`, then it must be the case that `adaptObserver(o1).equals(adaptObserver(o2))`.
- Specified by:
adaptObserverin classProxyObservable<Consumer<? super Boolean>,Consumer<? super Boolean>, Val<Boolean>> - Parameters:
observer- observer to be adapted for the underlying Observable- Returns:
- observer adapted for the underlying Observable
-