Package org.reactfx

Class AccumulatingStream<T,U>

java.lang.Object
org.reactfx.ObservableBase<Consumer<? super U>,U>
org.reactfx.EventStreamBase<U>
org.reactfx.AccumulatingStream<T,U>
All Implemented Interfaces:
EventStream<U>, Observable<Consumer<? super U>>, ProperEventStream<U>, ProperObservable<Consumer<? super U>,U>

class AccumulatingStream<T,U> extends EventStreamBase<U>
  • Field Details

    • input

      private final EventStream<T> input
    • initialTransformation

      private final Function<? super T,? extends U> initialTransformation
    • reduction

      private final BiFunction<? super U,? super T,? extends U> reduction
    • hasEvent

      private boolean hasEvent
    • event

      private U event
  • Constructor Details

  • Method Details

    • 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<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.