Skip to content
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

1.x: Add a sentence to documentation of take() operator #5719

Merged
merged 2 commits into from
Nov 11, 2017
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -10535,6 +10535,8 @@ public final Observable<T> take(final int count) {
/**
* Returns an Observable that emits those items emitted by source Observable before a specified time runs
* out.
* If time runs out before Observable is finished, termination events would be called on provided {@link Scheduler},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A <p> would cleanly separate the first sentence and the rest of the Javadoc. Also the wording could use some refinement:

<p>
If time runs out before the {@code Observable} completes normally, the {@code onComplete} 
event will be signaled on the default {@code computation} {@link Scheduler}.

+ which is {@code computation} by default.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/take.t.png" alt="">
* <dl>
Expand All @@ -10559,6 +10561,8 @@ public final Observable<T> take(long time, TimeUnit unit) {
/**
* Returns an Observable that emits those items emitted by source Observable before a specified time (on a
* specified Scheduler) runs out.
* If time runs out before Observable is finished, termination events would be called on provided {@link Scheduler},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<p>
If time runs out before the {@code Observable} completes normally, the {@code onComplete} 
event will be signaled on the provided {@link Scheduler}.

+ which is {@code computation} by default.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/take.ts.png" alt="">
* <dl>
Expand Down