Skip to content

Implemented the scheduler version of the 'Return' operator #452

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

Merged
merged 2 commits into from
Oct 31, 2013
Merged
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
17 changes: 17 additions & 0 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,23 @@ public static <T> Observable<T> just(T value) {
return from(list);
}

/**
* Returns an Observable that emits a single item and then completes on a specified scheduler.
* <p>
* This is a scheduler version of {@link Observable#just(Object)}.
*
* @param value
* the item to pass to the {@link Observer}'s {@link Observer#onNext onNext} method
* @param scheduler
* the scheduler to send the single element on
* @param <T>
* the type of that item
* @return an Observable that emits a single item and then completes on a specified scheduler.
*/
public static <T> Observable<T> just(T value, Scheduler scheduler) {
return just(value).observeOn(scheduler);
}

/**
* Flattens a sequence of Observables emitted by an Observable into one Observable, without any
* transformation.
Expand Down