Class OrElseVar<T>
- java.lang.Object
-
- org.reactfx.ObservableBase<java.util.function.Consumer<? super T>,T>
-
- org.reactfx.value.ValBase<T>
-
- net.sourceforge.pmd.util.fxdesigner.util.reactfx.OrElseVar<T>
-
- Type Parameters:
T
- Type of values
- All Implemented Interfaces:
javafx.beans.Observable
,javafx.beans.property.Property<T>
,javafx.beans.property.ReadOnlyProperty<T>
,javafx.beans.value.ObservableValue<T>
,javafx.beans.value.WritableValue<T>
,org.reactfx.Observable<java.util.function.Consumer<? super T>>
,org.reactfx.ProperObservable<java.util.function.Consumer<? super T>,T>
,org.reactfx.value.ProperVal<T>
,org.reactfx.value.Val<T>
,org.reactfx.value.Var<T>
public class OrElseVar<T> extends org.reactfx.value.ValBase<T> implements org.reactfx.value.Var<T>
A Var that when null, takes its default value from another Val.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(javafx.beans.value.ObservableValue<? extends T> observable)
protected T
computeValue()
protected org.reactfx.Subscription
connect()
boolean
isBound()
void
setValue(T value)
void
unbind()
-
Methods inherited from class org.reactfx.value.ValBase
getValue, invalidate, newObserver, observeInputs
-
Methods inherited from class org.reactfx.ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, notifyObservers, notifyObservers, observe, removeObserver, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.reactfx.ProperObservable
defaultEquals, defaultHashCode, defaultToString, notifyObservers
-
Methods 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, values
-
-
-
-
Constructor Detail
-
OrElseVar
public OrElseVar(org.reactfx.value.Val<? extends T> defaultValue)
-
-
Method Detail
-
bind
public void bind(javafx.beans.value.ObservableValue<? extends T> observable)
- Specified by:
bind
in interfacejavafx.beans.property.Property<T>
-
unbind
public void unbind()
- Specified by:
unbind
in interfacejavafx.beans.property.Property<T>
-
isBound
public boolean isBound()
- Specified by:
isBound
in interfacejavafx.beans.property.Property<T>
-
setValue
public void setValue(T value)
- Specified by:
setValue
in interfacejavafx.beans.value.WritableValue<T>
-
connect
protected org.reactfx.Subscription connect()
- Specified by:
connect
in classorg.reactfx.value.ValBase<T>
-
-