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>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Uprivate booleanprivate final EventStream<T> private final BiFunction<? super U, ? super T, ? extends U> -
Constructor Summary
ConstructorsConstructorDescriptionAccumulatingStream(EventStream<T> input, Function<? super T, ? extends U> initial, BiFunction<? super U, ? super T, ? extends U> reduction) -
Method Summary
Modifier and TypeMethodDescriptionprotected final SubscriptionStarts observing this observable's input(s), if any.Methods inherited from class org.reactfx.ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, newObserver, notifyObservers, notifyObservers, observe, removeObserver, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.reactfx.EventStream
accumulate, accumulate, accumulate, accumulateBetween, accumulateBetween, accumulateUntilLater, accumulateUntilLater, accumulateUntilLater, accumulateUntilLater, accumulateWhen, accumulateWhen, accumulative, accumulative, cast, conditionOn, conditionOnShowing, distinct, emitBothOnEach, emitOn, emitOnEach, feedTo, feedTo, filter, filter, filterMap, filterMap, flatMap, forgetful, fork, guardedBy, hook, latestN, map, mapToCompletionStage, mapToTask, onRecurseAccumulate, onRecurseAccumulate, onRecurseQueue, onRecurseReduce, onRecurseRetainLatest, or, pausable, pauseWhen, pin, queueBetween, queueUntilLater, queueUntilLater, reduceBetween, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceUntilLater, reduceUntilLater, reduceWhen, reducible, repeatOn, retainLatestBetween, retainLatestUntilLater, retainLatestUntilLater, retainLatestWhen, splitBy, subscribe, subscribeFor, subscribeForOne, successionEnds, successionEnds, supply, supply, supplyCompletionStage, supplyTask, suppressible, suppressWhen, suspenderOf, thenAccumulateFor, thenAccumulateFor, thenAccumulateFor, thenAccumulateFor, thenIgnoreFor, thenIgnoreFor, thenReduceFor, thenReduceFor, thenRetainLatestFor, thenRetainLatestFor, threadBridge, threadBridgeFromFx, threadBridgeToFx, toBinding, withDefaultEventMethods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserverMethods inherited from interface org.reactfx.ProperEventStream
defaultNotificationAccumulator, emitMethods inherited from interface org.reactfx.ProperObservable
defaultEquals, defaultHashCode, defaultToString, notifyObservers
-
Field Details
-
input
-
initialTransformation
-
reduction
-
hasEvent
private boolean hasEvent -
event
-
-
Constructor Details
-
AccumulatingStream
public AccumulatingStream(EventStream<T> input, Function<? super T, ? extends U> initial, BiFunction<? super U, ? super T, ? extends U> reduction)
-
-
Method Details
-
observeInputs
Description copied from class:ObservableBaseStarts 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 beforeObservableBase.newObserver(Object)is called for the first observer.- Specified by:
observeInputsin classObservableBase<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.
-