Skip to content

Commit 20bc4b6

Browse files
authored
Observable javadoc: the condition is inverted between takeWhile and takeUntil.
The current description of the difference between takeWhile and takeUntil just points to the evaluation time (before or after the element is emitted), but the (IMHO) more important fact is that the predicate is inverted between both: one emits just elements where the predicate is true, the other just elements where the predicate is false (and the first true one).
1 parent 1fa602d commit 20bc4b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/reactivex/rxjava3/core/Observable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14147,7 +14147,7 @@ public final Observable<T> takeLast(long time, @NonNull TimeUnit unit, @NonNull
1414714147
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/takeUntil.p.v3.png" alt="">
1414814148
* <p>
1414914149
* The difference between this operator and {@link #takeWhile(Predicate)} is that here, the condition is
14150-
* evaluated <em>after</em> the item is emitted.
14150+
* evaluated <em>after</em> the item is emitted. (Also, the condition is inverted.)
1415114151
*
1415214152
* <dl>
1415314153
* <dt><b>Scheduler:</b></dt>

0 commit comments

Comments
 (0)