Class 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<Consumer<? super T>>, org.reactfx.ProperObservable<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.
    • Constructor Summary

      Constructors 
      Constructor Description
      OrElseVar​(org.reactfx.value.Val<? extends T> defaultValue)  
    • 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 interface org.reactfx.Observable

        addObserver, observe, removeObserver
      • Methods inherited from interface javafx.beans.value.ObservableValue

        getValue
      • Methods inherited from interface org.reactfx.ProperObservable

        defaultEquals, defaultHashCode, defaultToString, notifyObservers
      • Methods inherited from interface org.reactfx.value.ProperVal

        defaultNotificationAccumulator
      • 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
      • Methods inherited from interface org.reactfx.value.Var

        bindBidirectional, getBean, getName, mapBidirectional, suspendable, unbindBidirectional
      • Methods inherited from interface javafx.beans.value.WritableValue

        getValue
    • 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 interface javafx.beans.property.Property<T>
      • unbind

        public void unbind()
        Specified by:
        unbind in interface javafx.beans.property.Property<T>
      • isBound

        public boolean isBound()
        Specified by:
        isBound in interface javafx.beans.property.Property<T>
      • setValue

        public void setValue​(T value)
        Specified by:
        setValue in interface javafx.beans.value.WritableValue<T>
      • connect

        protected org.reactfx.Subscription connect()
        Specified by:
        connect in class org.reactfx.value.ValBase<T>
      • computeValue

        protected T computeValue()
        Specified by:
        computeValue in class org.reactfx.value.ValBase<T>