Skip to content

Commit

Permalink
Update Observable.java
Browse files Browse the repository at this point in the history
from(scheduler) -> add diagram, standardize javadoc comments
range(scheduler) -> add diagram, standardize javadoc comments
startWith(scheduler) -> add diagram, standardize javadoc comments
  • Loading branch information
DavidMGross committed Nov 19, 2013
1 parent d1f0258 commit 310d530
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -667,16 +667,16 @@ public static <T> Observable<T> from(Iterable<? extends T> iterable) {

/**
* Converts an {@link Iterable} sequence into an Observable with the specified scheduler.
*
* @param iterable
* the source {@link Iterable} sequence
* @param scheduler
* the scheduler to emit the items of the iterable
* @param <T>
* the type of items in the {@link Iterable} sequence and the type of items to be
* emitted by the resulting Observable
* @return an Observable that emits each item in the source {@link Iterable} sequence with the specified scheduler
* @see <a href="http://msdn.microsoft.com/en-us/library/hh212140(v=vs.103).aspx">MSDN: Observable.ToObservable</a>
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/from.s.png">
*
* @param iterable the source {@link Iterable} sequence
* @param scheduler the scheduler to emit the items of the iterable
* @param <T> the type of items in the {@link Iterable} sequence and the
* type of items to be emitted by the resulting Observable
* @return an Observable that emits each item in the source {@link Iterable}
* sequence with the specified scheduler
* @see <a href="http://msdn.microsoft.com/en-us/library/hh212140.aspx">MSDN: Observable.ToObservable</a>
*/
public static <T> Observable<T> from(Iterable<? extends T> iterable, Scheduler scheduler) {
return from(iterable).observeOn(scheduler);
Expand Down Expand Up @@ -977,17 +977,15 @@ public static Observable<Integer> range(int start, int count) {
}

/**
* Generates an Observable that emits a sequence of integers within a specified range with the specified scheduler.
*
* @param start
* the value of the first integer in the sequence
* @param count
* the number of sequential integers to generate
* @param scheduler
* the scheduler to run the generator loop on
* Generates an Observable that emits a sequence of integers within a
* specified range with the specified scheduler.
* <p>
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/range.s.png">
* @param start the value of the first integer in the sequence
* @param count the number of sequential integers to generate
* @param scheduler the scheduler to run the generator loop on
* @return an Observable that emits a range of sequential integers
*
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211896(v=vs.103).aspx">Observable.Range Method (Int32, Int32, IScheduler)</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211896.aspx">Observable.Range Method (Int32, Int32, IScheduler)</a>
*/
public static Observable<Integer> range(int start, int count, Scheduler scheduler) {
return range(start, count).observeOn(scheduler);
Expand Down Expand Up @@ -3210,7 +3208,7 @@ public Observable<T> filter(Func1<? super T, Boolean> predicate) {
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinctUntilChanged.png">
*
* @return an Observable of sequentially distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229494%28v=vs.103%29.aspx">MSDN: Observable.distinctUntilChanged</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229494.aspx">MSDN: Observable.distinctUntilChanged</a>
*/
public Observable<T> distinctUntilChanged() {
return create(OperationDistinctUntilChanged.distinctUntilChanged(this));
Expand All @@ -3227,7 +3225,7 @@ public Observable<T> distinctUntilChanged() {
* value that is used for deciding whether an item is
* sequentially distinct from another one or not
* @return an Observable of sequentially distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229508%28v=vs.103%29.aspx">MSDN: Observable.distinctUntilChanged</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229508.aspx">MSDN: Observable.distinctUntilChanged</a>
*/
public <U> Observable<T> distinctUntilChanged(Func1<? super T, ? extends U> keySelector) {
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, keySelector));
Expand All @@ -3240,7 +3238,7 @@ public <U> Observable<T> distinctUntilChanged(Func1<? super T, ? extends U> keyS
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinct.png">
*
* @return an Observable of distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229764%28v=vs.103%29.aspx">MSDN: Observable.distinct</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229764.aspx">MSDN: Observable.distinct</a>
*/
public Observable<T> distinct() {
return create(OperationDistinct.distinct(this));
Expand All @@ -3256,7 +3254,7 @@ public Observable<T> distinct() {
* value that is used to decide whether an item is
* distinct from another one or not
* @return an Observable that emits distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh244310%28v=vs.103%29.aspx">MSDN: Observable.distinct</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh244310.aspx">MSDN: Observable.distinct</a>
*/
public <U> Observable<T> distinct(Func1<? super T, ? extends U> keySelector) {
return create(OperationDistinct.distinct(this, keySelector));
Expand Down Expand Up @@ -4588,28 +4586,30 @@ public Observable<T> startWith(Iterable<T> values) {
}

/**
* Emit a specified set of items with the specified scheduler before beginning to emit items from the source Observable.
*
* @param values
* Iterable of the items you want the modified Observable to emit first
* @param scheduler
* The scheduler to emit the prepended values on.
* Emit a specified set of items with the specified scheduler before
* beginning to emit items from the source Observable.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/startWith.s.png">
*
* @param values iterable of the items you want the modified Observable to emit first
* @param scheduler the scheduler to emit the prepended values on
* @return an Observable that exhibits the modified behavior
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229372(v=vs.103).aspx">MSDN: Observable.StartWith</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229372.aspx">MSDN: Observable.StartWith</a>
*/
public Observable<T> startWith(Iterable<T> values, Scheduler scheduler) {
return concat(from(values, scheduler), this);
}

/**
* Emit a specified array of items with the specified scheduler before beginning to emit items from the source Observable.
* Emit a specified array of items with the specified scheduler before
* beginning to emit items from the source Observable.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/startWith.s.png">
*
* @param values
* The items you want the modified Observable to emit first
* @param scheduler
* The scheduler to emit the prepended values on.
* @param values the items you want the modified Observable to emit first
* @param scheduler the scheduler to emit the prepended values on
* @return an Observable that exhibits the modified behavior
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229372(v=vs.103).aspx">MSDN: Observable.StartWith</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229372.aspx">MSDN: Observable.StartWith</a>
*/
public Observable<T> startWith(T[] values, Scheduler scheduler) {
return startWith(Arrays.asList(values), scheduler);
Expand Down

0 comments on commit 310d530

Please sign in to comment.