Class OrElse<T>

  • All Implemented Interfaces:
    javafx.beans.Observable, javafx.beans.value.ObservableValue<T>, Observable<java.util.function.Consumer<? super T>>, ProperObservable<java.util.function.Consumer<? super T>,​T>, ProperVal<T>, Val<T>

    class OrElse<T>
    extends ValBase<T>
    • Field Detail

      • src

        private final javafx.beans.value.ObservableValue<? extends T> src
      • other

        private final javafx.beans.value.ObservableValue<? extends T> other
      • trySrc

        private boolean trySrc
    • Constructor Detail

      • OrElse

        OrElse​(javafx.beans.value.ObservableValue<? extends T> src,
               javafx.beans.value.ObservableValue<? extends T> other)
    • Method Detail

      • connect

        protected 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<T>
        Returns:
        Subscription that can be used to stop observing inputs.