8000 Javadoc: Overveable.takeWhile vs. takeUntil: the condition is inverted by ePaul · Pull Request #7856 · ReactiveX/RxJava · GitHub
[go: up one dir, main page]

Skip to content

Javadoc: Overveable.takeWhile vs. takeUntil: the condition is inverted #7856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Observable javadoc: the condition is inverted between takeWhile and t…
…akeUntil.

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).
  • Loading branch information
ePaul authored Apr 14, 2025
commit 20bc4b61ae586c4075527558bf1a85bd8d1a3175
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/rxjava3/core/Observable.java
5DDF
Original file line number Diff line number Diff line change
Expand Up @@ -14147,7 +14147,7 @@ public final Observable<T> takeLast(long time, @NonNull TimeUnit unit, @NonNull
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/takeUntil.p.v3.png" alt="">
* <p>
* The difference between this operator and {@link #takeWhile(Predicate)} is that here, the condition is
* evaluated <em>after</em> the item is emitted.
* evaluated <em>after</em> the item is emitted. (Also, the condition is inverted.)
*
* <dl>
* <dt><b>Scheduler:</b></dt>
Expand Down
0