| Modifier and Type | Method and Description |
|---|---|
| public default EventStream | accumulate(BinaryOperator<T>
function to reduce two events into one. reduction)Returns an event stream that accumulates events emitted from this event stream and emits the accumulated value every time this stream emits a value. |
| public default <U> EventStream | accumulate(U
initial value of the accumulated value. unit, BiFunction<? super U, ? super T, ? extends U> function to add an event to the accumulated value. reduction)Returns an event stream that accumulates events emitted from this event stream and emits the accumulated value every time this stream emits a value. |
| public default <U> EventStream | accumulate(BiFunction<? super U, ? super T, ? extends U>
function to add an event to the accumulated value. reduction, Function<? super T, ? extends U> function to transform the first event from
this stream to an event that can be emitted from the returned stream.
Subsequent events emitted from this stream are accumulated to the value
returned from this function. initialTransformation)Returns an event stream that accumulates events emitted from this event stream and emits the accumulated value every time this stream emits a value. |
| public default <A> EventStream | accumulateBetween(EventStream<?> ticks, Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, List<T>> deconstruction)
Returns an event stream that, when an event arrives from this stream,
transforms it into a cumulative value using the
|
| public default <A> EventStream | accumulateBetween(EventStream<?> ticks, Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, List<T>> deconstruction)
A variation on
|
| public default <A> EventStream | accumulateUntilLater(Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, List<T>> deconstruction, Executor
executor that executes actions on the thread
from which this event stream is accessed. eventThreadExecutor)Version of |
| public default < type of the cumulative value (accumulator) A> EventStream | accumulateUntilLater(Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, List<T>> deconstruction)
Returns an event stream that, when an event is emitted from this stream,
transforms the event to a cumulative value using the
|
| public default <A> EventStream | accumulateUntilLater(Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, List<T>> deconstruction, Executor
executor that executes actions on the thread
from which this event stream is accessed. eventThreadExecutor)Version of |
| public default < type of the cumulative value (accumulator) A> EventStream | accumulateUntilLater(Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, List<T>> deconstruction)
A variation on
|
| public default <A> EventStream | accumulateWhen(ObservableValue<Boolean> condition, Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, AccumulatorSize> size, Function<? super A, ? extends T> head, Function<? super A, ? extends A> tail)
Shortcut for
|
| public default <A> EventStream | accumulateWhen(ObservableValue<Boolean> condition, Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> accumulation, Function<? super A, AccumulatorSize> size, Function<? super A, ? extends T> head, Function<? super A, ? extends A> tail)
Shortcut for
|
| public default < type of the cumulative value A> SuspendableEventStream | accumulative(Function<? super T, ? extends A>
Used to convert the first event after
suspension to the cumulative value. initialTransformation, BiFunction<? super A, ? super T, ? extends A> Used to accumulate further incoming events to the
cumulative value. accumulation, Function<? super A, AccumulatorSize> determines how many events can be emitted from the current
cumulative value. size, Function<? super A, ? extends T> produces the first event off the cumulative value. head, Function<? super A, ? extends A> returns a cumulative value that produces the same events
as the given cumulative value, except the event returned by tail)head.
May be destructive for the given cumulative value.Returns a suspendable event stream that, when suspended, accumulates
incoming events to a cumulative value of type |
| public default < type of the cumulative value A> SuspendableEventStream | accumulative(Supplier<? extends A>
Function that supplies unit element of the accumulation. unit, BiFunction<? super A, ? super T, ? extends A> Used to accumulate further incoming events to the
cumulative value. accumulation, Function<? super A, AccumulatorSize> determines how many events can be emitted from the current
cumulative value. size, Function<? super A, ? extends T> produces the first event off the cumulative value. head, Function<? super A, ? extends A> returns a cumulative value that produces the same events
as the given cumulative value, except the event returned by tail)head.
May be destructive for the given cumulative value.A variation on
|
| public default <U extends T> EventStream | |
| public default EventStream | conditionOn(ObservableValue<Boolean> condition)
Returns a new EventStream that only observes this
EventStream when |
| public default EventStream | conditionOnShowing(Node node)
Equivalent to |
| public default EventStream | |
| public default <I> EventStream | emitBothOnEach(EventStream<I> impulse)
Similar to |
| public default EventStream | emitOn(EventStream<?> impulse)
Returns a new event stream that, when an event arrives from the
|
| public default EventStream | emitOnEach(EventStream<?> impulse)
Returns a new event stream that, when an event arrives from the
|
| public default Subscription | |
| public default Subscription | feedTo(WritableValue<? super T> dest)
Starts setting all events emitted by this stream as the value of the given writable value. |
| public default EventStream | |
| public default <U extends T> EventStream | |
| public default <U> EventStream | |
| public default <U> EventStream | |
| public default <U> EventStream | flatMap(Function<? super T, ? extends EventStream<U>> f)
Returns a new event stream that, for each event x emitted from this stream, obtains the event stream f(x) and keeps emitting its events until the next event is emitted from this stream. |
| public default SuspendableEventStream | forgetful()
Returns a suspendable event stream that, when suspended, forgets all but the latest event emitted by this event stream. |
| public default Tuple2 | |
| public default EventStream | guardedBy(Guardian... guardians)
Deprecated
Use
suspenderOf(Suspendable) instead.
Returns a clone of this event stream guarded by the given guardians. |
| public default EventStream | |
| public default EventStream | |
| public default <U> EventStream | |
| public default <U> CompletionStageStream | mapToCompletionStage(Function<? super T, CompletionStage<U>> f)
Similar to |
| public default <U> TaskStream | mapToTask(Function<? super T, Task<U>> f)
Similar to |
| public default <A> EventStream | onRecurseAccumulate(Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> reduction, Function<? super A, AccumulatorSize> size, Function<? super A, ? extends T> head, Function<? super A, ? extends A> tail)
|
| public default <A> EventStream | onRecurseAccumulate(Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> reduction, Function<? super A, AccumulatorSize> size, Function<? super A, ? extends T> head, Function<? super A, ? extends A> tail)
|
| public default EventStream | |
| public default EventStream | |
| public default EventStream | |
| public default <U> EventStream | or(EventStream<? extends U> right)
Returns an event stream that emits all the events emitted from either
this stream or the |
| public default SuspendableEventStream | pausable()
Returns a suspendable event stream that, when suspended, stores the events emitted by this event stream and emits them when the returned stream's emission is resumed. |
| public default EventStream | |
| public default Subscription | Returns: subscription used to cancel the pinningIf this stream is a compound stream lazily subscribed to its inputs,
that is, subscribed to inputs only when it itself has some subscribers,
|
| public default EventStream | queueBetween(EventStream<?> ticks)
Returns an event stream that, when an event arrives from this stream, enqueues it for emission. |
| public default EventStream | queueUntilLater(Executor
executor that executes actions on the thread
from which this event stream is accessed. eventThreadExecutor)Version of |
| public default EventStream | queueUntilLater()
Returns an event stream that, when an event is emitted from this stream,
enqueues the event for emission and schedules emission using
|
| public default EventStream | reduceBetween(EventStream<?> ticks, BinaryOperator<T> reduction)
Returns an event stream that, when an event arrives from this stream, stores it for emission. |
| public default AwaitingEventStream | reduceSuccessions(BinaryOperator<T>
function to reduce two events into one. reduction, Duration the maximum time difference between two subsequent
events that can still be accumulated. timeout)Returns an event stream that accumulates events emitted from this event stream in close temporal succession. |
| public default < type of events emitted from the returned stream. U> AwaitingEventStream | reduceSuccessions(Function<? super T, ? extends U>
function to transform a single event
from this stream to an event that can be emitted from the returned
stream. initialTransformation, BiFunction<? super U, ? super T, ? extends U> function to add an event to the accumulated value. reduction, Duration the maximum time difference between two subsequent
events that can still be accumulated. timeout)A more general version of
|
| public default <U> AwaitingEventStream | reduceSuccessions(Supplier<? extends U>
function that provides the unit element
(i.e. initial value for accumulation) of type unitSupplier, BiFunction<? super U, ? super T, ? extends U> Ufunction to add an event to the accumulated value. reduction, Duration the maximum time difference between two subsequent
events that can still be accumulated. timeout)A convenient method that can be used when it is more convenient to
supply an identity of the type |
| public default AwaitingEventStream | reduceSuccessions(BinaryOperator<T>
function to reduce two events into one. reduction, Duration the maximum time difference between two subsequent
events that can still be accumulated. timeout, ScheduledExecutorService used to schedule timeout expiration scheduler, Executor executor that executes actions on the
thread on which this stream's events are emitted. The returned stream
will use this executor to emit events. eventThreadExecutor)An analog to
|
| public default <U> AwaitingEventStream | reduceSuccessions(Function<? super T, ? extends U>
function to transform a single event
from this stream to an event that can be emitted from the returned
stream. initialTransformation, BiFunction<? super U, ? super T, ? extends U> function to accumulate an event to the stored value reduction, Duration the maximum time difference between two subsequent
events that can still be accumulated. timeout, ScheduledExecutorService used to schedule timeout expiration scheduler, Executor executor that executes actions on the
thread on which this stream's events are emitted. The returned stream
will use this executor to emit events. eventThreadExecutor)An analog to
|
| public default <U> AwaitingEventStream | reduceSuccessions(Supplier<? extends U>
function that provides the unit element unitSupplier, BiFunction<? super U, ? super T, ? extends U> function to accumulate an event to the stored value reduction, Duration the maximum time difference between two subsequent
events that can still be accumulated. timeout, ScheduledExecutorService used to schedule timeout expiration scheduler, Executor executor that executes actions on the
thread on which this stream's events are emitted. The returned stream
will use this executor to emit events. eventThreadExecutor)An analog to
|
| public default EventStream | reduceUntilLater(BinaryOperator<T> reduction, Executor
executor that executes actions on the thread
from which this event stream is accessed. eventThreadExecutor)Version of |
| public default EventStream | reduceUntilLater(BinaryOperator<T> reduction)
Returns an event stream that, when an event is emitted from this stream,
stores the event for emission and schedules emission using
|
| public default EventStream | reduceWhen(ObservableValue<Boolean> condition, BinaryOperator<T> reduction)
Shortcut for |
| public default SuspendableEventStream | reducible(BinaryOperator<T> reduction)
Returns a suspendable event stream that, when suspended, reduces incoming
events by the given |
| public default EventStream | repeatOn(EventStream<?> impulse)
Returns a new event stream that emits all the events emitted from this
stream and in addition to that re-emits the most recent event on every
event emitted from |
| public default EventStream | |
| public default EventStream | retainLatestUntilLater(Executor
executor that executes actions on the thread
from which this event stream is accessed. eventThreadExecutor)Version of |
| public default EventStream | retainLatestUntilLater()
Returns an event stream that, when an event is emitted from this stream,
stores the event for emission and schedules emission using
|
| public default EventStream | retainLatestWhen(ObservableValue<Boolean> condition)
Shortcut for |
| public default EventStream | |
| public default Subscription | |
| public default Subscription | Returns: Subscription that may be used to unsubscribe before reachingn events handled by subscriber.limit on how many events may be handled by n, Consumer<? super T> subscriber.
Must be positive.handles emitted events. subscriber)Subscribes to this event stream for at most |
| public default Subscription | |
| public default AwaitingEventStream | successionEnds(Duration
the maximum time difference between two subsequent events
in a close succession. timeout)Returns an event stream that, when events are emitted from this stream in close temporal succession, emits only the last event of the succession. |
| public default AwaitingEventStream | successionEnds(Duration
the maximum time difference between two subsequent events
in a close succession. timeout, ScheduledExecutorService used to schedule timeout expiration scheduler, Executor executor that executes actions on the
thread on which this stream's events are emitted. The returned stream
will use this executor to emit events. eventThreadExecutor)An analog to |
| public default <U> EventStream | supply(U value)
Returns an event stream that emits the given constant value every time this stream emits a value. |
| public default <U> EventStream | |
| public default <U> CompletionStageStream | supplyCompletionStage(Supplier<CompletionStage<U>> f)
Similar to |
| public default <U> TaskStream | supplyTask(Supplier<Task<U>> f)
Similar to |
| public default SuspendableEventStream | suppressible()
Returns a suspendable event stream that, when suspended, suppresses any events emitted by this event stream. |
| public default EventStream | suppressWhen(ObservableValue<Boolean> condition)
Shortcut for |
| public default <S extends Suspendable> SuspenderStream | suspenderOf(S suspendable)
Returns an event stream that emits the same events as this event stream, but before each emission, suspends the given Suspendable and unsuspends it after the emission has completed. |
| public default <A> AwaitingEventStream | thenAccumulateFor(Duration duration, Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> reduction, Function<? super A, List<T>> deconstruction)
Returns an event stream that emits the first event emitted from this
stream and then, if the next event arrives within the given duration
since the last emitted event, it is converted to an accumulator value
using |
| public default <A> AwaitingEventStream | thenAccumulateFor(Duration duration, Function<? super T, ? extends A> initialTransformation, BiFunction<? super A, ? super T, ? extends A> reduction, Function<? super A, List<T>> deconstruction, ScheduledExecutorService scheduler, Executor eventThreadExecutor)
|
| public default <A> AwaitingEventStream | thenAccumulateFor(Duration duration, Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> reduction, Function<? super A, List<T>> deconstruction)
A variant of
|
| public default <A> AwaitingEventStream | thenAccumulateFor(Duration duration, Supplier<? extends A> unit, BiFunction<? super A, ? super T, ? extends A> reduction, Function<? super A, List<T>> deconstruction, ScheduledExecutorService scheduler, Executor eventThreadExecutor)
|
| public default AwaitingEventStream | thenIgnoreFor(Duration duration)
Returns an event stream that emits the first event emitted from this stream and then ignores the following events for the given duration. |
| public default AwaitingEventStream | |
| public default AwaitingEventStream | thenReduceFor(Duration duration, BinaryOperator<T> reduction)
Returns an event stream that emits the first event emitted from this stream and then reduces all following events that arrive within the given duration into a single event using the given reduction function. |
| public default AwaitingEventStream | thenReduceFor(Duration duration, BinaryOperator<T> reduction, ScheduledExecutorService scheduler, Executor eventThreadExecutor)
|
| public default AwaitingEventStream | thenRetainLatestFor(Duration duration)
Returns an event stream that emits the first event emitted from this stream and then remembers, but does not emit, the latest event emitted from this stream. |
| public default AwaitingEventStream | thenRetainLatestFor(Duration duration, ScheduledExecutorService scheduler, Executor eventThreadExecutor)
|
| public default EventStream | Returns: Event stream that emits the same events as this EventStream, but usestargetThreadExecutor to emit the events.executor that executes tasks on the thread
from which this EventStream is accessed. sourceThreadExecutor, Executor executor that executes tasks on the thread
from which the returned EventStream will be accessed. targetThreadExecutor)Transfers events from one thread to another. |
| public default EventStream | Returns: Event stream that emits the same events as this EventStream, but usestargetThreadExecutor to emit the events.executor that executes tasks on the thread
from which the returned EventStream will be accessed. targetThreadExecutor)Transfers events from the JavaFX application thread to another thread. |
| public default EventStream | Returns: Event stream that emits the same events as this EventStream, but emits them on the JavaFX application thread.executor that executes tasks on the thread
from which this EventStream is accessed. sourceThreadExecutor)Transfers events to the JavaFX application thread. |
| public default Binding | Returns: binding reflecting the most recently emitted value.used as the returned binding's value until this
stream emits the first value. initialValue)Returns a binding that holds the most recent event emitted from this stream. |
| public default EventStream | withDefaultEvent(T
the event this event stream will emit if something subscribes to this stream and this stream does not have an event. defaultEvent)Returns an event stream that immediately emits its event when something subscribes to it. |