Package org.reactfx

Class AccumulatingStream<T,​U>

    • Field Detail

      • initialTransformation

        private final java.util.function.Function<? super T,​? extends U> initialTransformation
      • reduction

        private final java.util.function.BiFunction<? super U,​? super T,​? extends U> reduction
      • hasEvent

        private boolean hasEvent
      • event

        private U event
    • Constructor Detail

      • AccumulatingStream

        public AccumulatingStream​(EventStream<T> input,
                                  java.util.function.Function<? super T,​? extends U> initial,
                                  java.util.function.BiFunction<? super U,​? super T,​? extends U> reduction)
    • Method Detail

      • observeInputs

        protected final Subscription observeInputs()
        Description copied from class: ObservableBase
        Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before ObservableBase.newObserver(Object) is called for the first observer.
        Specified by:
        observeInputs in class ObservableBase<java.util.function.Consumer<? super U>,​U>
        Returns:
        subscription used to stop observing inputs. The subscription is unsubscribed (i.e. input observation stops) when the number of observers goes down to 0.