Package org.reactfx
Class AccumulateUntilLaterStream<T,A>
- java.lang.Object
-
- org.reactfx.ObservableBase<java.util.function.Consumer<? super T>,T>
-
- org.reactfx.EventStreamBase<T>
-
- org.reactfx.AccumulateUntilLaterStream<T,A>
-
- All Implemented Interfaces:
EventStream<T>,Observable<java.util.function.Consumer<? super T>>,ProperEventStream<T>,ProperObservable<java.util.function.Consumer<? super T>,T>
class AccumulateUntilLaterStream<T,A> extends EventStreamBase<T>
-
-
Field Summary
Fields Modifier and Type Field Description private Aaccumprivate java.util.function.BiFunction<? super A,? super T,? extends A>accumulationprivate java.util.function.Function<? super A,java.util.List<T>>deconstructionprivate java.util.concurrent.ExecutoreventThreadExecutorprivate booleanhasValueprivate java.util.function.Function<? super T,? extends A>initialTransformationprivate EventStream<T>source
-
Constructor Summary
Constructors Constructor Description AccumulateUntilLaterStream(EventStream<T> source, java.util.function.Function<? super T,? extends A> initialTransformation, java.util.function.BiFunction<? super A,? super T,? extends A> accumulation, java.util.function.Function<? super A,java.util.List<T>> deconstruction, java.util.concurrent.Executor eventThreadExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidemitAccum()private voidhandleEvent(T event)protected SubscriptionobserveInputs()Starts 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, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods 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, withDefaultEvent
-
Methods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserver
-
Methods inherited from interface org.reactfx.ProperEventStream
defaultNotificationAccumulator, emit
-
Methods inherited from interface org.reactfx.ProperObservable
defaultEquals, defaultHashCode, defaultToString, notifyObservers
-
-
-
-
Field Detail
-
source
private final EventStream<T> source
-
initialTransformation
private final java.util.function.Function<? super T,? extends A> initialTransformation
-
accumulation
private final java.util.function.BiFunction<? super A,? super T,? extends A> accumulation
-
deconstruction
private final java.util.function.Function<? super A,java.util.List<T>> deconstruction
-
eventThreadExecutor
private final java.util.concurrent.Executor eventThreadExecutor
-
hasValue
private boolean hasValue
-
accum
private A accum
-
-
Constructor Detail
-
AccumulateUntilLaterStream
public AccumulateUntilLaterStream(EventStream<T> source, java.util.function.Function<? super T,? extends A> initialTransformation, java.util.function.BiFunction<? super A,? super T,? extends A> accumulation, java.util.function.Function<? super A,java.util.List<T>> deconstruction, java.util.concurrent.Executor eventThreadExecutor)
-
-
Method Detail
-
observeInputs
protected Subscription 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<java.util.function.Consumer<? super T>,T>- 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.
-
handleEvent
private void handleEvent(T event)
-
emitAccum
private void emitAccum()
-
-