Skip to content

Commit 3fbd6af

Browse files
committed
Return AwaitingEventStream from then*For(...).
1 parent 08b89ae commit 3fbd6af

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

reactfx/src/main/java/org/reactfx/EventStream.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ default AwaitingEventStream<T> successionEnds(
11021102
* and these events are emitted, the accumulator value is cleared and any
11031103
* events that arrive within {@code duration} are accumulated, and so on.
11041104
*/
1105-
default <A> EventStream<T> thenAccumulateFor(
1105+
default <A> AwaitingEventStream<T> thenAccumulateFor(
11061106
Duration duration,
11071107
Function<? super T, ? extends A> initialTransformation,
11081108
BiFunction<? super A, ? super T, ? extends A> reduction,
@@ -1115,7 +1115,7 @@ default <A> EventStream<T> thenAccumulateFor(
11151115
action -> FxTimer.create(duration, action));
11161116
}
11171117

1118-
default <A> EventStream<T> thenAccumulateFor(
1118+
default <A> AwaitingEventStream<T> thenAccumulateFor(
11191119
Duration duration,
11201120
Function<? super T, ? extends A> initialTransformation,
11211121
BiFunction<? super A, ? super T, ? extends A> reduction,
@@ -1139,7 +1139,7 @@ default <A> EventStream<T> thenAccumulateFor(
11391139
* for cases when it is more convenient to provide a unit element for
11401140
* accumulation than the initial transformation.
11411141
*/
1142-
default <A> EventStream<T> thenAccumulateFor(
1142+
default <A> AwaitingEventStream<T> thenAccumulateFor(
11431143
Duration duration,
11441144
Supplier<? extends A> unit,
11451145
BiFunction<? super A, ? super T, ? extends A> reduction,
@@ -1153,7 +1153,7 @@ default <A> EventStream<T> thenAccumulateFor(
11531153
deconstruction);
11541154
}
11551155

1156-
default <A> EventStream<T> thenAccumulateFor(
1156+
default <A> AwaitingEventStream<T> thenAccumulateFor(
11571157
Duration duration,
11581158
Supplier<? extends A> unit,
11591159
BiFunction<? super A, ? super T, ? extends A> reduction,
@@ -1180,7 +1180,7 @@ default <A> EventStream<T> thenAccumulateFor(
11801180
* reduced into a single event, that is emitted after {@code duration} has
11811181
* passed, and so on.
11821182
*/
1183-
default EventStream<T> thenReduceFor(
1183+
default AwaitingEventStream<T> thenReduceFor(
11841184
Duration duration,
11851185
BinaryOperator<T> reduction) {
11861186
return thenAccumulateFor(
@@ -1190,7 +1190,7 @@ default EventStream<T> thenReduceFor(
11901190
Collections::singletonList);
11911191
}
11921192

1193-
default EventStream<T> thenReduceFor(
1193+
default AwaitingEventStream<T> thenReduceFor(
11941194
Duration duration,
11951195
BinaryOperator<T> reduction,
11961196
ScheduledExecutorService scheduler,
@@ -1211,11 +1211,11 @@ default EventStream<T> thenReduceFor(
12111211
* duration from the last emitted event. This repeats after each emitted
12121212
* event.
12131213
*/
1214-
default EventStream<T> thenRetainLatestFor(Duration duration) {
1214+
default AwaitingEventStream<T> thenRetainLatestFor(Duration duration) {
12151215
return thenReduceFor(duration, (a, b) -> b);
12161216
}
12171217

1218-
default EventStream<T> thenRetainLatestFor(
1218+
default AwaitingEventStream<T> thenRetainLatestFor(
12191219
Duration duration,
12201220
ScheduledExecutorService scheduler,
12211221
Executor eventThreadExecutor) {
@@ -1232,15 +1232,15 @@ default EventStream<T> thenRetainLatestFor(
12321232
* The first event that arrives after the given duration is emitted and
12331233
* following events are ignored for the given duration again, and so on.
12341234
*/
1235-
default EventStream<T> thenIgnoreFor(Duration duration) {
1235+
default AwaitingEventStream<T> thenIgnoreFor(Duration duration) {
12361236
return thenAccumulateFor(
12371237
duration,
12381238
t -> Collections.<T>emptyList(),
12391239
(l, t) -> l,
12401240
Function.<List<T>>identity());
12411241
}
12421242

1243-
default EventStream<T> thenIgnoreFor(
1243+
default AwaitingEventStream<T> thenIgnoreFor(
12441244
Duration duration,
12451245
ScheduledExecutorService scheduler,
12461246
Executor eventThreadExecutor) {

0 commit comments

Comments
 (0)