diff --git a/rxjava-core/src/main/java/rx/Observable.java b/rxjava-core/src/main/java/rx/Observable.java index ce2b883764..53327b371d 100644 --- a/rxjava-core/src/main/java/rx/Observable.java +++ b/rxjava-core/src/main/java/rx/Observable.java @@ -130,10 +130,10 @@ * The documentation for this interface makes use of marble diagrams. The * following legend explains these diagrams: *

- * + * *

* For more information see the - * RxJava Wiki + * RxJava Wiki * * @param the type of the item emitted by the Observable */ @@ -195,7 +195,7 @@ protected Observable(OnSubscribeFunc onSubscribe) { * in which multiple Observers will receive their notifications. *

* For more information see the - * RxJava Wiki + * RxJava Wiki * * @param observer the Observer * @return a {@link Subscription} reference with which the {@link Observer} @@ -276,7 +276,7 @@ public Subscription subscribe(Observer observer) { * Observers will receive their notifications. *

* For more information see the - * RxJava Wiki + * RxJava Wiki * * @param observer the Observer * @param scheduler the {@link Scheduler} on which Observers subscribe to @@ -478,6 +478,7 @@ public Subscription subscribe(final Action1 onNext, final Action1Observable.publish() and Observable.multicast() */ public ConnectableObservable multicast(Subject subject) { return OperationMulticast.multicast(this, subject); @@ -547,7 +548,7 @@ public Subscription onSubscribe(Observer observer) { * Creates an Observable that will execute the given function when an * {@link Observer} subscribes to it. *

- * + * *

* Write the function you pass to create so that it behaves as * an Observable: It should invoke the Observer's @@ -568,6 +569,7 @@ public Subscription onSubscribe(Observer observer) { * allow the Observer to cancel the subscription * @return an Observable that, when an {@link Observer} subscribes to it, * will execute the given function + * @see create() */ public static Observable create(OnSubscribeFunc func) { return new Observable(func); @@ -583,6 +585,7 @@ public static Observable create(OnSubscribeFunc func) { * @return an Observable that returns no data to the {@link Observer} and * immediately invokes the {@link Observer}'s * {@link Observer#onCompleted() onCompleted} method + * @see empty() * @see MSDN: Observable.Empty Method */ public static Observable empty() { @@ -603,6 +606,7 @@ public static Observable empty() { * immediately invokes the {@link Observer}'s * {@link Observer#onCompleted() onCompleted} method with the * specified scheduler + * @see empty() * @see MSDN: Observable.Empty Method (IScheduler) */ public static Observable empty(Scheduler scheduler) { @@ -621,6 +625,7 @@ public static Observable empty(Scheduler scheduler) { * @return an Observable that invokes the {@link Observer}'s * {@link Observer#onError onError} method when the Observer * subscribes to it + * @see error() * @see MSDN: Observable.Throw Method */ public static Observable error(Throwable exception) { @@ -640,6 +645,7 @@ public static Observable error(Throwable exception) { * @return an Observable that invokes the {@link Observer}'s * {@link Observer#onError onError} method with the specified * scheduler + * @see error() * @see MSDN: Observable.Throw Method */ public static Observable error(Throwable exception, Scheduler scheduler) { @@ -649,7 +655,7 @@ public static Observable error(Throwable exception, Scheduler scheduler) /** * Converts an {@link Iterable} sequence into an Observable. *

- * + * *

* Note: the entire iterable sequence is immediately emitted each time an * {@link Observer} subscribes. Since this occurs before the @@ -661,6 +667,7 @@ public static Observable error(Throwable exception, Scheduler scheduler) * type of items to be emitted by the resulting Observable * @return an Observable that emits each item in the source {@link Iterable} * sequence + * @see from() */ public static Observable from(Iterable iterable) { return create(OperationToObservableIterable.toObservableIterable(iterable)); @@ -677,6 +684,7 @@ public static Observable from(Iterable iterable) { * 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 from() * @see MSDN: Observable.ToObservable */ public static Observable from(Iterable iterable, Scheduler scheduler) { @@ -686,7 +694,7 @@ public static Observable from(Iterable iterable, Scheduler s /** * Converts an Array into an Observable. *

- * + * *

* Note: the entire array is immediately emitted each time an * {@link Observer} subscribes. Since this occurs before the @@ -697,6 +705,7 @@ public static Observable from(Iterable iterable, Scheduler s * @param the type of items in the Array and the type of items to be * emitted by the resulting Observable * @return an Observable that emits each item in the source Array + * @see from() */ public static Observable from(T[] items) { return create(OperationToObservableIterable.toObservableIterable(Arrays.asList(items))); @@ -705,7 +714,7 @@ public static Observable from(T[] items) { /** * Converts an item into an Observable that emits that item. *

- * + * *

* Note: the item is immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -716,6 +725,7 @@ public static Observable from(T[] items) { * @param the type of the item, and the type of the item to be * emitted by the resulting Observable * @return an Observable that emits the item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -726,7 +736,7 @@ public static Observable from(T t1) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -738,6 +748,7 @@ public static Observable from(T t1) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -748,7 +759,7 @@ public static Observable from(T t1, T t2) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -761,6 +772,7 @@ public static Observable from(T t1, T t2) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -771,7 +783,7 @@ public static Observable from(T t1, T t2, T t3) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -785,6 +797,7 @@ public static Observable from(T t1, T t2, T t3) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -795,7 +808,7 @@ public static Observable from(T t1, T t2, T t3, T t4) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -810,6 +823,7 @@ public static Observable from(T t1, T t2, T t3, T t4) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -820,7 +834,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -836,6 +850,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -846,7 +861,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -863,6 +878,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -873,7 +889,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -891,6 +907,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -901,7 +918,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -920,6 +937,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -930,7 +948,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T /** * Converts a series of items into an Observable. *

- * + * *

* Note: the items will be immediately emitted each time an {@link Observer} * subscribes. Since this occurs before the {@link Subscription} is @@ -950,6 +968,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T * @param the type of items, and the type of items to be emitted by the * resulting Observable * @return an Observable that emits each item + * @see from() */ @SuppressWarnings("unchecked") // suppress unchecked because we are using varargs inside the method @@ -961,7 +980,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T * Generates an Observable that emits a sequence of integers within a * specified range. *

- * + * *

* Note: the entire range is immediately emitted each time an * {@link Observer} subscribes. Since this occurs before the @@ -971,6 +990,7 @@ public static Observable from(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T * @param start the value of the first integer in the sequence * @param count the number of sequential integers to generate * @return an Observable that emits a range of sequential integers + * @see range() * @see Observable.Range Method (Int32, Int32) */ public static Observable range(int start, int count) { @@ -981,11 +1001,12 @@ public static Observable 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 * @return an Observable that emits a range of sequential integers + * @see range() * @see Observable.Range Method (Int32, Int32, IScheduler) */ public static Observable range(int start, int count, Scheduler scheduler) { @@ -997,7 +1018,7 @@ public static Observable range(int start, int count, Scheduler schedule * Observable for each new Observer that subscribes. That is, for each * subscriber, the actuall Observable is determined by the factory function. *

- * + * *

* The defer operator allows you to defer or delay emitting items from an * Observable until such time as an Observer subscribes to the Observable. @@ -1010,6 +1031,7 @@ public static Observable range(int start, int count, Scheduler schedule * @param the type of the items emitted by the Observable * @return an Observable whose {@link Observer}s trigger an invocation of * the given Observable factory function + * @see defer() */ public static Observable defer(Func0> observableFactory) { return create(OperationDefer.defer(observableFactory)); @@ -1033,6 +1055,7 @@ public static Observable defer(Func0> o * {@link Observer#onNext onNext} method * @param the type of that item * @return an Observable that emits a single item and then completes + * @see just() */ public static Observable just(T value) { List list = new ArrayList(); @@ -1053,6 +1076,7 @@ public static Observable just(T value) { * @param scheduler the scheduler to send the single element on * @return an Observable that emits a single item and then completes on a * specified scheduler + * @see just() */ public static Observable just(T value, Scheduler scheduler) { return just(value).observeOn(scheduler); @@ -1071,6 +1095,7 @@ public static Observable just(T value, Scheduler scheduler) { * @return an Observable that emits items that are the result of flattening * the items emitted by the Observables emitted by the * {@code source} Observable + * @see merge() * @see MSDN: Observable.Merge Method */ public static Observable merge(Observable> source) { @@ -1090,6 +1115,7 @@ public static Observable merge(Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1112,6 +1138,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1135,6 +1162,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1159,6 +1187,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1184,6 +1213,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1210,6 +1240,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1237,6 +1268,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1265,6 +1297,7 @@ public static Observable merge(Observable t1, Observablemerge() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1283,6 +1316,7 @@ public static Observable merge(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ public static Observable concat(Observable> observables) { @@ -1300,6 +1334,7 @@ public static Observable concat(Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1321,6 +1356,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1342,6 +1378,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1364,6 +1401,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1387,6 +1425,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1411,6 +1450,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1436,6 +1476,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1462,6 +1503,7 @@ public static Observable concat(Observable t1, Observableconcat() * @see MSDN: Observable.Concat Method */ @SuppressWarnings("unchecked") @@ -1491,6 +1533,7 @@ public static Observable concat(Observable t1, ObservablemergeDelayError() * @see MSDN: Observable.Merge Method */ public static Observable mergeDelayError(Observable> source) { @@ -1518,6 +1561,7 @@ public static Observable mergeDelayError(ObservablemergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1548,6 +1592,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t3 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1580,6 +1625,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t4 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1612,6 +1658,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t5 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1645,6 +1692,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t6 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1679,6 +1727,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t7 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1714,6 +1763,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t8 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1750,6 +1800,7 @@ public static Observable mergeDelayError(Observable t1, Obse * @param t9 an Observable to be merged * @return an Observable that emits items that are the result of flattening * the items emitted by the {@code source} Observables + * @see mergeDelayError() * @see MSDN: Observable.Merge Method */ @SuppressWarnings("unchecked") @@ -1762,13 +1813,14 @@ public static Observable mergeDelayError(Observable t1, Obse * Returns an Observable that never sends any items or notifications to an * {@link Observer}. *

- * + * *

* This Observable is useful primarily for testing purposes. * * @param the type of items (not) emitted by the Observable * @return an Observable that never sends any items or notifications to an * {@link Observer} + * @see never() */ public static Observable never() { return new NeverObservable(); @@ -1779,11 +1831,12 @@ public static Observable never() { * that emits the items emitted by the most recently published of those * Observables. *

- * + * * * @param sequenceOfSequences the source Observable that emits Observables * @return an Observable that emits only the items emitted by the most * recently published Observable + * @see switchOnNext() * @deprecated use {@link #switchOnNext} */ @Deprecated @@ -1796,11 +1849,12 @@ public static Observable switchDo(Observable - * + * * * @param sequenceOfSequences the source Observable that emits Observables * @return an Observable that emits only the items emitted by the most * recently published Observable + * @see switchOnNext() */ public static Observable switchOnNext(Observable> sequenceOfSequences) { return create(OperationSwitch.switchDo(sequenceOfSequences)); @@ -1810,7 +1864,7 @@ public static Observable switchOnNext(Observable - * + * *

* A well-behaved Observable does not interleave its invocations of the * {@link Observer#onNext onNext}, {@link Observer#onCompleted onCompleted}, @@ -1824,6 +1878,7 @@ public static Observable switchOnNext(Observablesynchronize() */ public Observable synchronize() { return create(OperationSynchronize.synchronize(this)); @@ -1835,7 +1890,7 @@ public Observable synchronize() { * accomplished by acquiring a mutual-exclusion lock for the object * provided as the lock parameter. *

- * + * *

* A well-behaved Observable does not interleave its invocations of the * {@link Observer#onNext onNext}, {@link Observer#onCompleted onCompleted}, @@ -1850,6 +1905,7 @@ public Observable synchronize() { * @return an Observable that is a chronologically well-behaved version of * the source Observable, and that synchronously notifies its * {@link Observer}s + * @see synchronize() */ public Observable synchronize(Object lock) { return create(OperationSynchronize.synchronize(this, lock)); @@ -1866,12 +1922,13 @@ public static Observable synchronize(Observable source) { /** * Emits an item each time interval (containing a sequential number). *

- * + * * * @param interval interval size in time units (see below) * @param unit time units to use for the interval size * @return an Observable that emits an item each time interval - * @see MSDN: Observable.Interval + * @see interval() + * @see MSDN: Observable.Interval */ public static Observable interval(long interval, TimeUnit unit) { return create(OperationInterval.interval(interval, unit)); @@ -1880,13 +1937,14 @@ public static Observable interval(long interval, TimeUnit unit) { /** * Emits an item each time interval (containing a sequential number). *

- * + * * * @param interval interval size in time units (see below) * @param unit time units to use for the interval size * @param scheduler the scheduler to use for scheduling the items * @return an Observable that emits an item each time interval - * @see MSDN: Observable.Interval + * @see interval() + * @see MSDN: Observable.Interval */ public static Observable interval(long interval, TimeUnit unit, Scheduler scheduler) { return create(OperationInterval.interval(interval, unit, scheduler)); @@ -1899,7 +1957,7 @@ public static Observable interval(long interval, TimeUnit unit, Scheduler * Note: If events keep firing faster than the timeout then no data will be * emitted. *

- * + * *

* Information on debounce vs throttle: *

@@ -1914,6 +1972,7 @@ public static Observable interval(long interval, TimeUnit unit, Scheduler * @param unit the {@link TimeUnit} for the timeout * @return an {@link Observable} that filters out items that are too * quickly followed by newer items + * @see debounce() * @see #throttleWithTimeout(long, TimeUnit) */ public Observable debounce(long timeout, TimeUnit unit) { @@ -1927,7 +1986,7 @@ public Observable debounce(long timeout, TimeUnit unit) { * Note: If events keep firing faster than the timeout then no data will be * emitted. *

- * + * *

* Information on debounce vs throttle: *

@@ -1944,6 +2003,7 @@ public Observable debounce(long timeout, TimeUnit unit) { * timers that handle the timeout for each event * @return an {@link Observable} that filters out items that are too * quickly followed by newer items + * @see debounce() * @see #throttleWithTimeout(long, TimeUnit, Scheduler) */ public Observable debounce(long timeout, TimeUnit unit, Scheduler scheduler) { @@ -1957,7 +2017,7 @@ public Observable debounce(long timeout, TimeUnit unit, Scheduler scheduler) * Note: If events keep firing faster than the timeout then no data will be * emitted. *

- * + * *

* Information on debounce vs throttle: *

@@ -1972,6 +2032,7 @@ public Observable debounce(long timeout, TimeUnit unit, Scheduler scheduler) * @param unit the {@link TimeUnit} for the timeout * @return an {@link Observable} that filters out items that are too * quickly followed by newer items + * @see throttleWithTimeout() * @see #debounce(long, TimeUnit) */ public Observable throttleWithTimeout(long timeout, TimeUnit unit) { @@ -1985,7 +2046,7 @@ public Observable throttleWithTimeout(long timeout, TimeUnit unit) { * Note: If events keep firing faster than the timeout then no data will be * emitted. *

- * + * *

* Information on debounce vs throttle: *

@@ -2002,6 +2063,7 @@ public Observable throttleWithTimeout(long timeout, TimeUnit unit) { * timers that handle the timeout for each event * @return an {@link Observable} that filters out items that are too * quickly followed by newer items + * @see throttleWithTimeout() * @see #debounce(long, TimeUnit, Scheduler) */ public Observable throttleWithTimeout(long timeout, TimeUnit unit, Scheduler scheduler) { @@ -2015,12 +2077,13 @@ public Observable throttleWithTimeout(long timeout, TimeUnit unit, Scheduler * This differs from {@link #throttleLast} in that this only tracks passage * of time whereas {@link #throttleLast} ticks at scheduled intervals. *

- * + * * * @param windowDuration time to wait before sending another item after * emitting the last item * @param unit the unit of time for the specified timeout * @return an Observable that performs the throttle operation + * @see throttleFirst() */ public Observable throttleFirst(long windowDuration, TimeUnit unit) { return create(OperationThrottleFirst.throttleFirst(this, windowDuration, unit)); @@ -2033,7 +2096,7 @@ public Observable throttleFirst(long windowDuration, TimeUnit unit) { * This differs from {@link #throttleLast} in that this only tracks passage * of time whereas {@link #throttleLast} ticks at scheduled intervals. *

- * + * * * @param skipDuration time to wait before sending another item after * emitting the last item @@ -2041,6 +2104,7 @@ public Observable throttleFirst(long windowDuration, TimeUnit unit) { * @param scheduler the {@link Scheduler} to use internally to manage the * timers that handle timeout for each event * @return an Observable that performs the throttle operation + * @see throttleFirst() */ public Observable throttleFirst(long skipDuration, TimeUnit unit, Scheduler scheduler) { return create(OperationThrottleFirst.throttleFirst(this, skipDuration, unit, scheduler)); @@ -2054,12 +2118,13 @@ public Observable throttleFirst(long skipDuration, TimeUnit unit, Scheduler s * scheduled interval whereas {@link #throttleFirst} does not tick, it just * tracks passage of time. *

- * + * * * @param intervalDuration duration of windows within which the last item * will be emitted * @param unit the unit of time for the specified interval * @return an Observable that performs the throttle operation + * @see throttleLast() * @see #sample(long, TimeUnit) */ public Observable throttleLast(long intervalDuration, TimeUnit unit) { @@ -2074,12 +2139,13 @@ public Observable throttleLast(long intervalDuration, TimeUnit unit) { * scheduled interval whereas {@link #throttleFirst} does not tick, it just * tracks passage of time. *

- * + * * * @param intervalDuration duration of windows within which the last item * will be emitted * @param unit the unit of time for the specified interval * @return an Observable that performs the throttle operation + * @see throttleLast() * @see #sample(long, TimeUnit, Scheduler) */ public Observable throttleLast(long intervalDuration, TimeUnit unit, Scheduler scheduler) { @@ -2090,10 +2156,11 @@ public Observable throttleLast(long intervalDuration, TimeUnit unit, Schedule * Wraps each item emitted by a source Observable in a {@link Timestamped} * object. *

- * + * * * @return an Observable that emits timestamped items from the source * Observable + * @see timestamp() */ public Observable> timestamp() { return create(OperationTimestamp.timestamp(this)); @@ -2102,7 +2169,7 @@ public Observable> timestamp() { /** * Converts a {@link Future} into an Observable. *

- * + * *

* You can convert any object that supports the {@link Future} interface * into an Observable that emits the return value of the {@link Future#get} @@ -2116,6 +2183,7 @@ public Observable> timestamp() { * @param the type of object that the {@link Future} returns, and also * the type of item to be emitted by the resulting Observable * @return an Observable that emits the item from the source Future + * @see from() */ public static Observable from(Future future) { return create(OperationToObservableFuture.toObservableFuture(future)); @@ -2124,7 +2192,7 @@ public static Observable from(Future future) { /** * Converts a {@link Future} into an Observable. *

- * + * *

* You can convert any object that supports the {@link Future} interface * into an Observable that emits the return value of the {@link Future#get} @@ -2139,6 +2207,7 @@ public static Observable from(Future future) { * @param the type of object that the {@link Future} returns, and also * the type of item to be emitted by the resulting Observable * @return an Observable that emits the item from the source Future + * @see from() */ public static Observable from(Future future, Scheduler scheduler) { return create(OperationToObservableFuture.toObservableFuture(future)).subscribeOn(scheduler); @@ -2147,7 +2216,7 @@ public static Observable from(Future future, Scheduler sched /** * Converts a {@link Future} into an Observable with timeout. *

- * + * *

* You can convert any object that supports the {@link Future} interface * into an Observable that emits the return value of the {link Future#get} @@ -2163,6 +2232,7 @@ public static Observable from(Future future, Scheduler sched * @param the type of object that the {@link Future} returns, and also * the type of item to be emitted by the resulting Observable * @return an Observable that emits the item from the source {@link Future} + * @see from() */ public static Observable from(Future future, long timeout, TimeUnit unit) { return create(OperationToObservableFuture.toObservableFuture(future, timeout, unit)); @@ -2172,13 +2242,14 @@ public static Observable from(Future future, long timeout, T * Returns an Observable that emits Boolean values that indicate whether the * pairs of items emitted by two source Observables are equal. *

- * + * * * @param first the first Observable to compare * @param second the second Observable to compare * @param the type of items emitted by each Observable * @return an Observable that emits Booleans that indicate whether the * corresponding items emitted by the source Observables are equal + * @see sequenceEqual() */ public static Observable sequenceEqual(Observable first, Observable second) { return sequenceEqual(first, second, new Func2() { @@ -2194,7 +2265,7 @@ public Boolean call(T first, T second) { * pairs of items emitted by two source Observables are equal based on the * results of a specified equality function. *

- * + * * * @param first the first Observable to compare * @param second the second Observable to compare @@ -2203,6 +2274,7 @@ public Boolean call(T first, T second) { * @param the type of items emitted by each Observable * @return an Observable that emits Booleans that indicate whether the * corresponding items emitted by the source Observables are equal + * @see sequenceEqual() */ public static Observable sequenceEqual(Observable first, Observable second, Func2 equality) { return zip(first, second, equality); @@ -2233,6 +2305,7 @@ public static Observable sequenceEqual(Observable firs * each of the source Observables, results in an item that will * be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Observable o1, Observable o2, Func2 zipFunction) { return create(OperationZip.zip(o1, o2, zipFunction)); @@ -2265,6 +2338,7 @@ public static Observable zip(Observable o1, Observa * each of the source Observables, results in an item * that will be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Func3 zipFunction) { return create(OperationZip.zip(o1, o2, o3, zipFunction)); @@ -2298,6 +2372,7 @@ public static Observable zip(Observable o1, Obs * each of the source Observables, results in an item that will * be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Func4 zipFunction) { return create(OperationZip.zip(o1, o2, o3, o4, zipFunction)); @@ -2332,6 +2407,7 @@ public static Observable zip(Observable o1, * each of the source Observables, results in an item * that will be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Func5 zipFunction) { return create(OperationZip.zip(o1, o2, o3, o4, o5, zipFunction)); @@ -2365,6 +2441,7 @@ public static Observable zip(Observable * each of the source Observables, results in an item * that will be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Func6 zipFunction) { @@ -2400,6 +2477,7 @@ public static Observable zip(Observablezip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Func7 zipFunction) { @@ -2436,6 +2514,7 @@ public static Observable zip(Observablezip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Func8 zipFunction) { @@ -2473,6 +2552,7 @@ public static Observable zip(Observablezip() */ public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9, Func9 zipFunction) { @@ -2493,6 +2573,7 @@ public static Observable zip(Observab * source observable values * @return an Observable that combines the source Observables with the * given combine function + * @see combineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Func2 combineFunction) { return create(OperationCombineLatest.combineLatest(o1, o2, combineFunction)); @@ -2513,6 +2594,7 @@ public static Observable combineLatest(Observable o * source observable values * @return an Observable that combines the source Observables with the * given combine function + * @see combineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Func3 combineFunction) { return create(OperationCombineLatest.combineLatest(o1, o2, o3, combineFunction)); @@ -2534,6 +2616,7 @@ public static Observable combineLatest(ObservablecombineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Func4 combineFunction) { @@ -2557,6 +2640,7 @@ public static Observable combineLatest(ObservablecombineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Func5 combineFunction) { @@ -2581,6 +2665,7 @@ public static Observable combineLatest(ObservablecombineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Func6 combineFunction) { @@ -2606,6 +2691,7 @@ public static Observable combineLatest(Observable * source observable values * @return an Observable that combines the source Observables with the * given combine function + * @see combineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Func7 combineFunction) { @@ -2632,6 +2718,7 @@ public static Observable combineLatest(Observ * source observable values * @return an Observable that combines the source Observables with the * given combine function + * @see combineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Func8 combineFunction) { @@ -2659,6 +2746,7 @@ public static Observable combineLatest(Ob * source observable values * @return an Observable that combines the source Observables with the * given combine function + * @see combineLatest() */ public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9, Func9 combineFunction) { @@ -2668,7 +2756,7 @@ public static Observable combineLates /** * Creates an Observable that produces buffers of collected items. *

- * + * *

* This Observable produces connected, non-overlapping buffers. The current * buffer is emitted and replaced with a new buffer when the Observable @@ -2687,6 +2775,7 @@ public static Observable combineLates * buffers, which are emitted when the current {@link Observable} * created with the {@link Func0} argument produces a * {@link rx.util.Closing} object + * @see buffer() */ public Observable> buffer(Func0> bufferClosingSelector) { return create(OperationBuffer.buffer(this, bufferClosingSelector)); @@ -2695,7 +2784,7 @@ public Observable> buffer(Func0> /** * Creates an Observable which produces buffers of collected values. *

- * + * *

* This Observable produces buffers. Buffers are created when the specified * bufferOpenings Observable produces a {@link rx.util.Opening} @@ -2715,6 +2804,7 @@ public Observable> buffer(Func0> * @return an {@link Observable} that produces buffers that are created and * emitted when the specified {@link Observable}s publish certain * objects + * @see buffer() */ public Observable> buffer(Observable bufferOpenings, Func1> bufferClosingSelector) { return create(OperationBuffer.buffer(this, bufferOpenings, bufferClosingSelector)); @@ -2723,7 +2813,7 @@ public Observable> buffer(Observable bufferOpenings, /** * Creates an Observable that produces buffers of collected items. *

- * + * *

* This Observable produces connected, non-overlapping buffers, each * containing count items. When the source Observable completes @@ -2733,6 +2823,7 @@ public Observable> buffer(Observable bufferOpenings, * @param count the maximum size of each buffer before it should be emitted * @return an {@link Observable} that produces connected, non-overlapping * buffers containing at most "count" items + * @see buffer() */ public Observable> buffer(int count) { return create(OperationBuffer.buffer(this, count)); @@ -2741,7 +2832,7 @@ public Observable> buffer(int count) { /** * Creates an Observable which produces buffers of collected items. *

- * + * *

* This Observable produces buffers every skip items, each * containing count items. When the source Observable @@ -2756,6 +2847,7 @@ public Observable> buffer(int count) { * @return an {@link Observable} that produces buffers every * skip item containing at most count * items + * @see buffer() */ public Observable> buffer(int count, int skip) { return create(OperationBuffer.buffer(this, count, skip)); @@ -2764,7 +2856,7 @@ public Observable> buffer(int count, int skip) { /** * Creates an Observable that produces buffers of collected values. *

- * + * *

* This Observable produces connected, non-overlapping buffers, each of a * fixed duration specified by the timespan argument. When the @@ -2777,6 +2869,7 @@ public Observable> buffer(int count, int skip) { * argument * @return an {@link Observable} that produces connected, non-overlapping * buffers with a fixed duration + * @see buffer() */ public Observable> buffer(long timespan, TimeUnit unit) { return create(OperationBuffer.buffer(this, timespan, unit)); @@ -2785,7 +2878,7 @@ public Observable> buffer(long timespan, TimeUnit unit) { /** * Creates an Observable that produces buffers of collected values. *

- * + * *

* This Observable produces connected, non-overlapping buffers, each of a * fixed duration specified by the timespan argument. When the @@ -2800,6 +2893,7 @@ public Observable> buffer(long timespan, TimeUnit unit) { * and start of a buffer * @return an {@link Observable} that produces connected, non-overlapping * buffers with a fixed duration + * @see buffer() */ public Observable> buffer(long timespan, TimeUnit unit, Scheduler scheduler) { return create(OperationBuffer.buffer(this, timespan, unit, scheduler)); @@ -2813,7 +2907,7 @@ public Observable> buffer(long timespan, TimeUnit unit, Scheduler schedu * first). When the source Observable completes or encounters an error, the * current buffer is emitted and the event is propagated. *

- * + * * * @param timespan the period of time each buffer collects values before it * should be emitted and replaced with a new buffer @@ -2823,6 +2917,7 @@ public Observable> buffer(long timespan, TimeUnit unit, Scheduler schedu * @return an {@link Observable} that produces connected, non-overlapping * buffers that are emitted after a fixed duration or when the * buffer reaches maximum capacity (whichever occurs first) + * @see buffer() */ public Observable> buffer(long timespan, TimeUnit unit, int count) { return create(OperationBuffer.buffer(this, timespan, unit, count)); @@ -2836,7 +2931,7 @@ public Observable> buffer(long timespan, TimeUnit unit, int count) { * first). When the source Observable completes or encounters an error, the * current buffer is emitted and the event is propagated. *

- * + * * * @param timespan the period of time each buffer collects values before it * should be emitted and replaced with a new buffer @@ -2848,6 +2943,7 @@ public Observable> buffer(long timespan, TimeUnit unit, int count) { * @return an {@link Observable} that produces connected, non-overlapping * buffers that are emitted after a fixed duration or when the * buffer has reached maximum capacity (whichever occurs first) + * @see buffer() */ public Observable> buffer(long timespan, TimeUnit unit, int count, Scheduler scheduler) { return create(OperationBuffer.buffer(this, timespan, unit, count, scheduler)); @@ -2861,7 +2957,7 @@ public Observable> buffer(long timespan, TimeUnit unit, int count, Sched * source Observable completes or encounters an error, the current buffer is * emitted and the event is propagated. *

- * + * * * @param timespan the period of time each buffer collects values before it * should be emitted @@ -2871,6 +2967,7 @@ public Observable> buffer(long timespan, TimeUnit unit, int count, Sched * and timeshift arguments * @return an {@link Observable} that produces new buffers periodically and * emits these after a fixed timespan has elapsed. + * @see buffer() */ public Observable> buffer(long timespan, long timeshift, TimeUnit unit) { return create(OperationBuffer.buffer(this, timespan, timeshift, unit)); @@ -2884,7 +2981,7 @@ public Observable> buffer(long timespan, long timeshift, TimeUnit unit) * source Observable completes or encounters an error, the current buffer is * emitted and the event is propagated. *

- * + * * * @param timespan the period of time each buffer collects values before it * should be emitted @@ -2896,6 +2993,7 @@ public Observable> buffer(long timespan, long timeshift, TimeUnit unit) * and start of a buffer * @return an {@link Observable} that produces new buffers periodically and * emits these after a fixed timespan has elapsed + * @see buffer() */ public Observable> buffer(long timespan, long timeshift, TimeUnit unit, Scheduler scheduler) { return create(OperationBuffer.buffer(this, timespan, timeshift, unit, scheduler)); @@ -2910,7 +3008,7 @@ public Observable> buffer(long timespan, long timeshift, TimeUnit unit, * then be used to create a new Observable to listen for the end of the next * window. *

- * + * * * @param closingSelector the {@link Func0} used to produce an * {@link Observable} for every window created. When this @@ -2920,6 +3018,7 @@ public Observable> buffer(long timespan, long timeshift, TimeUnit unit, * windows, which are emitted when the current {@link Observable} * created with the closingSelector argument emits a * {@link rx.util.Closing} object. + * @see window() */ public Observable> window(Func0> closingSelector) { return create(OperationWindow.window(this, closingSelector)); @@ -2933,7 +3032,7 @@ public Observable> window(Func0 - * + * * * @param windowOpenings the {@link Observable} that, when it produces a * {@link rx.util.Opening} object, causes another @@ -2946,6 +3045,7 @@ public Observable> window(Func0window() */ public Observable> window(Observable windowOpenings, Func1> closingSelector) { return create(OperationWindow.window(this, windowOpenings, closingSelector)); @@ -2958,11 +3058,12 @@ public Observable> window(Observable windowOpen * encounters an error, the current window is emitted, and the event is * propagated. *

- * + * * * @param count the maximum size of each window before it should be emitted * @return an {@link Observable} that produces connected, non-overlapping * windows containing at most count items + * @see window() */ public Observable> window(int count) { return create(OperationWindow.window(this, count)); @@ -2975,7 +3076,7 @@ public Observable> window(int count) { * completes or encounters an error, the current window is emitted and the * event is propagated. *

- * + * * * @param count the maximum size of each window before it should be emitted * @param skip how many items need to be skipped before starting a new @@ -2983,6 +3084,7 @@ public Observable> window(int count) { * are equal this is the same operation as {@link #window(int)}. * @return an {@link Observable} that produces windows every "skipped" * items containing at most count items + * @see window() */ public Observable> window(int count, int skip) { return create(OperationWindow.window(this, count, skip)); @@ -2995,7 +3097,7 @@ public Observable> window(int count, int skip) { * Observable completes or encounters an error, the current window is * emitted and the event is propagated. *

- * + * * * @param timespan the period of time each window collects items before it * should be emitted and replaced with a new window @@ -3003,6 +3105,7 @@ public Observable> window(int count, int skip) { * argument * @return an {@link Observable} that produces connected, non-overlapping * windows with a fixed duration + * @see window() */ public Observable> window(long timespan, TimeUnit unit) { return create(OperationWindow.window(this, timespan, unit)); @@ -3015,7 +3118,7 @@ public Observable> window(long timespan, TimeUnit unit) { * source Observable completes or encounters an error, the current window is * emitted and the event is propagated. *

- * + * * * @param timespan the period of time each window collects items before it * should be emitted and replaced with a new window @@ -3025,6 +3128,7 @@ public Observable> window(long timespan, TimeUnit unit) { * and start of a window * @return an {@link Observable} that produces connected, non-overlapping * windows with a fixed duration + * @see window() */ public Observable> window(long timespan, TimeUnit unit, Scheduler scheduler) { return create(OperationWindow.window(this, timespan, unit, scheduler)); @@ -3038,7 +3142,7 @@ public Observable> window(long timespan, TimeUnit unit, Scheduler * reached first). When the source Observable completes or encounters an * error, the current window is emitted and the event is propagated. *

- * + * * * @param timespan the period of time each window collects values before it * should be emitted and replaced with a new window @@ -3048,6 +3152,7 @@ public Observable> window(long timespan, TimeUnit unit, Scheduler * @return an {@link Observable} that produces connected, non-overlapping * windows that are emitted after a fixed duration or when the * window has reached maximum capacity (whichever occurs first) + * @see window() */ public Observable> window(long timespan, TimeUnit unit, int count) { return create(OperationWindow.window(this, timespan, unit, count)); @@ -3061,7 +3166,7 @@ public Observable> window(long timespan, TimeUnit unit, int count) * first). When the source Observable completes or encounters an error, the * current window is emitted and the event is propagated. *

- * + * * * @param timespan the period of time each window collects values before it * should be emitted and replaced with a new window @@ -3073,6 +3178,7 @@ public Observable> window(long timespan, TimeUnit unit, int count) * @return an {@link Observable} that produces connected non-overlapping * windows that are emitted after a fixed duration or when the * window has reached maximum capacity (whichever occurs first). + * @see window() */ public Observable> window(long timespan, TimeUnit unit, int count, Scheduler scheduler) { return create(OperationWindow.window(this, timespan, unit, count, scheduler)); @@ -3086,7 +3192,7 @@ public Observable> window(long timespan, TimeUnit unit, int count, * source Observable completes or encounters an error, the current window is * emitted and the event is propagated. *

- * + * * * @param timespan the period of time each window collects values before it * should be emitted @@ -3096,6 +3202,7 @@ public Observable> window(long timespan, TimeUnit unit, int count, * and timeshift arguments * @return an {@link Observable} that produces new windows periodically and * emits these after a fixed timespan has elapsed + * @see window() */ public Observable> window(long timespan, long timeshift, TimeUnit unit) { return create(OperationWindow.window(this, timespan, timeshift, unit)); @@ -3109,7 +3216,7 @@ public Observable> window(long timespan, long timeshift, TimeUnit * source Observable completes or encounters an error, the current window is * emitted and the event is propagated. *

- * + * * * @param timespan the period of time each window collects values before it * should be emitted @@ -3121,6 +3228,7 @@ public Observable> window(long timespan, long timeshift, TimeUnit * and start of a window * @return an {@link Observable} that produces new windows periodically and * emits these after a fixed timespan has elapsed + * @see window() */ public Observable> window(long timespan, long timeshift, TimeUnit unit, Scheduler scheduler) { return create(OperationWindow.window(this, timespan, timeshift, unit, scheduler)); @@ -3149,6 +3257,7 @@ public Observable> window(long timespan, long timeshift, TimeUnit * each of the source Observables, results in an item * that will be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Observable> ws, final FuncN zipFunction) { return ws.toList().mapMany(new Func1>, Observable>() { @@ -3182,6 +3291,7 @@ public Observable call(List> wsList) { * each of the source Observables, results in an item * that will be emitted by the resulting Observable * @return an Observable that emits the zipped results + * @see zip() */ public static Observable zip(Iterable> ws, FuncN zipFunction) { return create(OperationZip.zip(ws, zipFunction)); @@ -3197,6 +3307,7 @@ public static Observable zip(Iterable> ws, FuncN< * the filter * @return an Observable that emits only those items in the original * Observable that the filter evaluates as {@code true} + * @see filter() */ public Observable filter(Func1 predicate) { return create(OperationFilter.filter(this, predicate)); @@ -3209,6 +3320,7 @@ public Observable filter(Func1 predicate) { * * * @return an Observable of sequentially distinct items + * @see distinctUntilChanged() * @see MSDN: Observable.distinctUntilChanged */ public Observable distinctUntilChanged() { @@ -3226,6 +3338,7 @@ public Observable 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 distinctUntilChanged() * @see MSDN: Observable.distinctUntilChanged */ public Observable distinctUntilChanged(Func1 keySelector) { @@ -3239,6 +3352,7 @@ public Observable distinctUntilChanged(Func1 keyS * * * @return an Observable of distinct items + * @see distinct() * @see MSDN: Observable.distinct */ public Observable distinct() { @@ -3255,6 +3369,7 @@ public Observable 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 distinct() * @see MSDN: Observable.distinct */ public Observable distinct(Func1 keySelector) { @@ -3273,6 +3388,7 @@ public Observable distinct(Func1 keySelector) { * or equal to the number of elements in * the source sequence * @throws IndexOutOfBoundsException if index is less than 0 + * @see elementAt() */ public Observable elementAt(int index) { return create(OperationElementAt.elementAt(this, index)); @@ -3290,6 +3406,7 @@ public Observable elementAt(int index) { * the source sequence, or the default item if the index is outside * the bounds of the source sequence * @throws IndexOutOfBoundsException if index is less than 0 + * @see elementAtOrDefault() */ public Observable elementAtOrDefault(int index, T defaultValue) { return create(OperationElementAt.elementAtOrDefault(this, index, defaultValue)); @@ -3308,6 +3425,7 @@ public Observable elementAtOrDefault(int index, T defaultValue) { * * @param predicate the condition to test every element * @return a subscription function for creating the target Observable + * @see exists() * @see MSDN: Observable.Any Note: the description in this page is wrong. */ public Observable exists(Func1 predicate) { @@ -3322,6 +3440,7 @@ public Observable exists(Func1 predicate) { * @param element the item to search in the sequence * @return an Observable that emits true if the item is in the * source sequence + * @see contains() * @see MSDN: Observable.Contains */ public Observable contains(final T element) { @@ -3337,12 +3456,13 @@ public Boolean call(T t1) { * {@link Observer#onCompleted onCompleted} or * {@link Observer#onError onError}. *

- * + * * * @param action an {@link Action0} to be invoked when the source * Observable finishes * @return an Observable that emits the same items as the source Observable, * then invokes the {@link Action0} + * @see finallyDo() * @see MSDN: Observable.Finally Method */ public Observable finallyDo(Action0 action) { @@ -3365,6 +3485,7 @@ public Observable finallyDo(Action0 action) { * transformation function to each item emitted by the source * Observable and merging the results of the Observables obtained * from this transformation. + * @see flatMap() * @see #mapMany(Func1) */ public Observable flatMap(Func1> func) { @@ -3381,6 +3502,7 @@ public Observable flatMap(Func1where() * @see #filter(Func1) */ public Observable where(Func1 predicate) { @@ -3396,7 +3518,8 @@ public Observable where(Func1 predicate) { * @param func a function to apply to each item emitted by the Observable * @return an Observable that emits the items from the source Observable, * transformed by the given function - * @see MSDN: Observable.Select + * @see map() + * @see MSDN: Observable.Select */ public Observable map(Func1 func) { return create(OperationMap.map(this, func)); @@ -3413,7 +3536,8 @@ public Observable map(Func1 func) { * additional parameter. * @return an Observable that emits the items from the source Observable, * transformed by the given function - * @see MSDN: Observable.Select + * @see mapWithIndex() + * @see MSDN: Observable.Select */ public Observable mapWithIndex(Func2 func) { return create(OperationMap.mapWithIndex(this, func)); @@ -3435,6 +3559,7 @@ public Observable mapWithIndex(Func2 fun * transformation function to each item emitted by the source * Observable and merging the results of the Observables obtained * from this transformation. + * @see mapMany() * @see #flatMap(Func1) */ public Observable mapMany(Func1> func) { @@ -3450,6 +3575,7 @@ public Observable mapMany(Func1materialize() * @see MSDN: Observable.materialize */ public Observable> materialize() { @@ -3460,12 +3586,13 @@ public Observable> materialize() { * Asynchronously subscribes and unsubscribes Observers on the specified * {@link Scheduler}. *

- * + * * * @param scheduler the {@link Scheduler} to perform subscription and * unsubscription actions on * @return the source Observable modified so that its subscriptions and * unsubscriptions happen on the specified {@link Scheduler} + * @see subscribeOn() */ public Observable subscribeOn(Scheduler scheduler) { return create(OperationSubscribeOn.subscribeOn(this, scheduler)); @@ -3475,11 +3602,12 @@ public Observable subscribeOn(Scheduler scheduler) { * Asynchronously notify {@link Observer}s on the specified * {@link Scheduler}. *

- * + * * * @param scheduler the {@link Scheduler} to notify {@link Observer}s on * @return the source Observable modified so that its {@link Observer}s are * notified on the specified {@link Scheduler} + * @see observeOn() */ public Observable observeOn(Scheduler scheduler) { return create(OperationObserveOn.observeOn(this, scheduler)); @@ -3491,13 +3619,14 @@ public Observable observeOn(Scheduler scheduler) { * objects emitted by the source Observable into the items or notifications * they represent. *

- * + * * * @return an Observable that emits the items and notifications embedded in * the {@link Notification} objects emitted by the source Observable - * @see MSDN: Observable.dematerialize * @throws Throwable if the source Observable is not of type - * {@code Observable>}. + * {@code Observable>} + * @see dematerialize() + * @see MSDN: Observable.dematerialize */ @SuppressWarnings("unchecked") public Observable dematerialize() { @@ -3531,6 +3660,7 @@ public Observable dematerialize() { * take over if the source Observable encounters an * error * @return the original Observable, with appropriately modified behavior + * @see onErrorResumeNext() */ public Observable onErrorResumeNext(final Func1> resumeFunction) { return create(OperationOnErrorResumeNextViaFunction.onErrorResumeNextViaFunction(this, resumeFunction)); @@ -3563,6 +3693,7 @@ public Observable onErrorResumeNext(final Func1onErrorResumeNext() */ public Observable onErrorResumeNext(final Observable resumeSequence) { return create(OperationOnErrorResumeNextViaObservable.onErrorResumeNextViaObservable(this, resumeSequence)); @@ -3600,6 +3731,7 @@ public Observable onErrorResumeNext(final Observable resumeSeque * take over if the source Observable encounters an * error * @return the original Observable, with appropriately modified behavior + * @see onExceptionResumeNextViaObservable() */ public Observable onExceptionResumeNext(final Observable resumeSequence) { return create(OperationOnExceptionResumeNextViaObservable.onExceptionResumeNextViaObservable(this, resumeSequence)); @@ -3610,7 +3742,7 @@ public Observable onExceptionResumeNext(final Observable resumeS * rather than invoking {@link Observer#onError onError} if it encounters an * error. *

- * + * *

* By default, when an Observable encounters an error that prevents it from * emitting the expected item to its {@link Observer}, the Observable @@ -3630,6 +3762,7 @@ public Observable onExceptionResumeNext(final Observable resumeS * Observable will emit if the source Observable * encounters an error * @return the original Observable with appropriately modified behavior + * @see onErrorReturn() */ public Observable onErrorReturn(Func1 resumeFunction) { return create(OperationOnErrorReturn.onErrorReturn(this, resumeFunction)); @@ -3656,7 +3789,8 @@ public Observable onErrorReturn(Func1 resumeFunction) * @return an Observable that emits a single item that is the result of * accumulating the output from the source Observable * @throws IllegalArgumentException if the Observable sequence is empty - * @see MSDN: Observable.Aggregate + * @see reduce() + * @see MSDN: Observable.Aggregate * @see Wikipedia: Fold (higher-order function) */ public Observable reduce(Func2 accumulator) { @@ -3676,7 +3810,8 @@ public Observable reduce(Func2 accumulator) { * * @return an Observable that emits the number of counted elements of the * source Observable as its single item - * @see MSDN: Observable.Count + * @see count() + * @see MSDN: Observable.Count */ public Observable count() { return reduce(0, new Func2() { @@ -3696,7 +3831,8 @@ public Integer call(Integer t1, T t2) { * @param source source Observable to compute the sum of * @return an Observable that emits the sum of all the items of the * source Observable as its single item - * @see MSDN: Observable.Sum + * @see sum() + * @see MSDN: Observable.Sum */ public static Observable sum(Observable source) { return OperationSum.sum(source); @@ -3711,7 +3847,8 @@ public static Observable sum(Observable source) { * @param source source Observable to compute the sum of * @return an Observable that emits the sum of all the items of the * source Observable as its single item - * @see MSDN: Observable.Sum + * @see sumLongs() + * @see MSDN: Observable.Sum */ public static Observable sumLongs(Observable source) { return OperationSum.sumLongs(source); @@ -3726,7 +3863,8 @@ public static Observable sumLongs(Observable source) { * @param source source Observable to compute the sum of * @return an Observable that emits the sum of all the items of the * source Observable as its single item - * @see MSDN: Observable.Sum + * @see sumFloats() + * @see MSDN: Observable.Sum */ public static Observable sumFloats(Observable source) { return OperationSum.sumFloats(source); @@ -3741,7 +3879,8 @@ public static Observable sumFloats(Observable source) { * @param source source Observable to compute the sum of * @return an Observable that emits the sum of all the items of the * source Observable as its single item - * @see MSDN: Observable.Sum + * @see sumDoubles() + * @see MSDN: Observable.Sum */ public static Observable sumDoubles(Observable source) { return OperationSum.sumDoubles(source); @@ -3757,7 +3896,8 @@ public static Observable sumDoubles(Observable source) { * @return an Observable that emits the average of all the items emitted by * the source Observable as its single item * @throws IllegalArgumentException if the Observable sequence is empty - * @see MSDN: Observable.Average + * @see average() + * @see MSDN: Observable.Average */ public static Observable average(Observable source) { return OperationAverage.average(source); @@ -3772,7 +3912,8 @@ public static Observable average(Observable source) { * @param source source observable to compute the average of * @return an Observable that emits the average of all the items emitted by * the source Observable as its single item - * @see MSDN: Observable.Average + * @see averageLongs() + * @see MSDN: Observable.Average */ public static Observable averageLongs(Observable source) { return OperationAverage.averageLongs(source); @@ -3787,7 +3928,8 @@ public static Observable averageLongs(Observable source) { * @param source source observable to compute the average of * @return an Observable that emits the average of all the items emitted by * the source Observable as its single item - * @see MSDN: Observable.Average + * @see averageFloats() + * @see MSDN: Observable.Average */ public static Observable averageFloats(Observable source) { return OperationAverage.averageFloats(source); @@ -3802,7 +3944,8 @@ public static Observable averageFloats(Observable source) { * @param source source observable to compute the average of * @return an Observable that emits the average of all the items emitted by * the source Observable as its single item - * @see MSDN: Observable.Average + * @see averageDoubles() + * @see MSDN: Observable.Average */ public static Observable averageDoubles(Observable source) { return OperationAverage.averageDoubles(source); @@ -3834,6 +3977,7 @@ public static > Observable min(Observable * @return an Observable that emits the minimum value according to the * specified comparator * @throws IllegalArgumentException if the source is empty + * @see min() * @see MSDN: Observable.Min */ public Observable min(Comparator comparator) { @@ -3850,6 +3994,7 @@ public Observable min(Comparator comparator) { * @param selector the key selector function * @return an Observable that emits a List of the items with the minimum key * value + * @see minBy() * @see MSDN: Observable.MinBy */ public > Observable> minBy(Func1 selector) { @@ -3867,6 +4012,7 @@ public > Observable> minBy(Func1 s * @param comparator the comparator used to compare key values * @return an Observable that emits a List of the elements with the minimum * key value according to the specified comparator + * @see minBy() * @see MSDN: Observable.MinBy */ public Observable> minBy(Func1 selector, Comparator comparator) { @@ -3882,6 +4028,7 @@ public Observable> minBy(Func1 selector, Comparator * @param source an Observable to determine the maximum item of * @return an Observable that emits the maximum element * @throws IllegalArgumentException if the source is empty + * @see max() * @see MSDN: Observable.Max */ public static > Observable max(Observable source) { @@ -3899,6 +4046,7 @@ public static > Observable max(Observable * @return an Observable that emits the maximum item according to the * specified comparator * @throws IllegalArgumentException if the source is empty + * @see max() * @see MSDN: Observable.Max */ public Observable max(Comparator comparator) { @@ -3914,6 +4062,7 @@ public Observable max(Comparator comparator) { * @param selector the key selector function * @return an Observable that emits a List of the items with the maximum key * value + * @see maxBy() * @see MSDN: Observable.MaxBy */ public > Observable> maxBy(Func1 selector) { @@ -3931,6 +4080,7 @@ public > Observable> maxBy(Func1 s * @param comparator the comparator used to compare key values * @return an Observable that emits a List of the elements with the maximum * key value according to the specified comparator + * @see maxBy() * @see MSDN: Observable.MaxBy */ public Observable> maxBy(Func1 selector, Comparator comparator) { @@ -3946,6 +4096,7 @@ public Observable> maxBy(Func1 selector, Comparator * * @return a {@link ConnectableObservable} that upon connection causes the * source Observable to emit items to its {@link Observer}s + * @see replay() */ public ConnectableObservable replay() { return OperationMulticast.multicast(this, ReplaySubject. create()); @@ -3968,6 +4119,7 @@ public ConnectableObservable replay() { * * @param retryCount number of retry attempts before failing * @return an Observable with retry logic + * @see retry() */ public Observable retry(int retryCount) { return create(OperationRetry.retry(this, retryCount)); @@ -3990,6 +4142,7 @@ public Observable retry(int retryCount) { * output would be [1, 2, 1, 2, 3, 4, 5, onCompleted]. * * @return an Observable with retry logic + * @see retry() */ public Observable retry() { return create(OperationRetry.retry(this)); @@ -4000,7 +4153,7 @@ public Observable retry() { * auto-subscribes to the source Observable rather than returning a * {@link ConnectableObservable}. *

- * + * *

* This is useful when you want an Observable to cache responses and you * can't control the subscribe/unsubscribe behavior of all the @@ -4013,6 +4166,7 @@ public Observable retry() { * * @return an Observable that, when first subscribed to, caches all of its * notifications for the benefit of subsequent subscribers. + * @see cache() */ public Observable cache() { return create(OperationCache.cache(this)); @@ -4030,6 +4184,7 @@ public Observable cache() { * {@code Observable} * @return an Observable with the output of the {@link Func1} executed on a * {@link Scheduler} + * @see parallel() */ public Observable parallel(Func1, Observable> f) { return OperationParallel.parallel(this, f); @@ -4047,6 +4202,7 @@ public Observable parallel(Func1, Observable> f) { * @param s a {@link Scheduler} to perform the work on * @return an Observable with the output of the {@link Func1} executed on a * {@link Scheduler} + * @see parallel() */ public Observable parallel(final Func1, Observable> f, final Scheduler s) { @@ -4055,34 +4211,51 @@ public Observable parallel(final Func1, Observable> f, f /** - * Merges an Observable> to Observable> - * with number of inner Observables as defined by parallelObservables. + * Merges an Observable<Observable<T>> to + * Observable<Observable<T>> with the number of + * inner Observables defined by parallelObservables. + *

+ * For example, if the original + * Observable<Observable<T>> has 100 Observables to + * be emitted and parallelObservables is 8, the 100 will be + * grouped onto 8 output Observables. *

- * For example, if the original Observable> has 100 Observables to be emitted and parallelObservables - * is defined as 8, the 100 will be grouped onto 8 output Observables. + * This is a mechanism for efficiently processing n number of + * Observables on a smaller m number of resources (typically CPU + * cores). *

- * This is a mechanism for efficiently processing N number of Observables on a smaller N number of resources (typically CPU cores). + * * - * @param parallelObservables - * the number of Observables to merge into. - * @return an Observable of Observables constrained to number defined by parallelObservables. + * @param parallelObservables the number of Observables to merge into + * @return an Observable of Observables constrained to number defined by + * parallelObservables + * @see parallelMerge() */ public static Observable> parallelMerge(Observable> source, int parallelObservables) { return OperationParallelMerge.parallelMerge(source, parallelObservables); } /** - * Merges an Observable> to Observable> - * with number of inner Observables as defined by parallelObservables and runs each Observable on the defined Scheduler. + * Merges an Observable<Observable<T>> to + * Observable<Observable<T>> with the number of + * inner Observables defined by parallelObservables and runs + * each Observable on the defined Scheduler. *

- * For example, if the original Observable> has 100 Observables to be emitted and parallelObservables - * is defined as 8, the 100 will be grouped onto 8 output Observables. + * For example, if the original + * Observable<Observable<T>> has 100 Observables to + * be emitted and parallelObservables is 8, the 100 will be + * grouped onto 8 output Observables. *

- * This is a mechanism for efficiently processing N number of Observables on a smaller N number of resources (typically CPU cores). + * This is a mechanism for efficiently processing n number of + * Observables on a smaller m number of resources (typically CPU + * cores). + *

+ * * - * @param parallelObservables - * the number of Observables to merge into. - * @return an Observable of Observables constrained to number defined by parallelObservables. + * @param parallelObservables the number of Observables to merge into + * @return an Observable of Observables constrained to number defined by + * parallelObservables. + * @see parallelMerge() */ public static Observable> parallelMerge(Observable> source, int parallelObservables, Scheduler scheduler) { return OperationParallelMerge.parallelMerge(source, parallelObservables, scheduler); @@ -4094,10 +4267,11 @@ public static Observable> parallelMerge(Observable - * + * * * @return a {@link ConnectableObservable} that upon connection causes the * source Observable to emit items to its {@link Observer}s + * @see publish() */ public ConnectableObservable publish() { return OperationMulticast.multicast(this, PublishSubject. create()); @@ -4107,9 +4281,10 @@ public ConnectableObservable publish() { * Returns a {@link ConnectableObservable} that shares a single subscription * that contains the last notification only. *

- * + * * * @return a {@link ConnectableObservable} + * @see publishLast() */ public ConnectableObservable publishLast() { return OperationMulticast.multicast(this, AsyncSubject. create()); @@ -4119,7 +4294,8 @@ public ConnectableObservable publishLast() { * Synonymous with reduce(). *

* - * + * + * @see aggregate() * @see #reduce(Func2) */ public Observable aggregate(Func2 accumulator) { @@ -4148,6 +4324,7 @@ public Observable aggregate(Func2 accumulator) { * @return an Observable that emits a single item that is the result of * accumulating the output from the items emitted by the source * Observable + * @see reduce() * @see MSDN: Observable.Aggregate * @see Wikipedia: Fold (higher-order function) */ @@ -4160,6 +4337,7 @@ public Observable reduce(R initialValue, Func2 accumulat *

* * + * @see aggregate() * @see #reduce(Object, Func2) */ public Observable aggregate(R initialValue, Func2 accumulator) { @@ -4187,7 +4365,8 @@ public Observable aggregate(R initialValue, Func2 accumu * accumulator call * @return an Observable that emits the results of each call to the * accumulator function - * @see MSDN: Observable.Scan + * @see scan() + * @see MSDN: Observable.Scan */ public Observable scan(Func2 accumulator) { return create(OperationScan.scan(this, accumulator)); @@ -4197,12 +4376,13 @@ public Observable scan(Func2 accumulator) { * Returns an Observable that emits the results of sampling the items * emitted by the source Observable at a specified time interval. *

- * + * * * @param period the sampling rate * @param unit the {@link TimeUnit} in which period is defined * @return an Observable that emits the results of sampling the items * emitted by the source Observable at the specified time interval + * @see sample() */ public Observable sample(long period, TimeUnit unit) { return create(OperationSample.sample(this, period, unit)); @@ -4212,13 +4392,14 @@ public Observable sample(long period, TimeUnit unit) { * Returns an Observable that emits the results of sampling the items * emitted by the source Observable at a specified time interval. *

- * + * * * @param period the sampling rate * @param unit the {@link TimeUnit} in which period is defined * @param scheduler the {@link Scheduler} to use when sampling * @return an Observable that emits the results of sampling the items * emitted by the source Observable at the specified time interval + * @see sample() */ public Observable sample(long period, TimeUnit unit, Scheduler scheduler) { return create(OperationSample.sample(this, period, unit, scheduler)); @@ -4246,7 +4427,8 @@ public Observable sample(long period, TimeUnit unit, Scheduler scheduler) { * accumulator call * @return an Observable that emits the results of each call to the * accumulator function - * @see MSDN: Observable.Scan + * @see scan() + * @see MSDN: Observable.Scan */ public Observable scan(R initialValue, Func2 accumulator) { return create(OperationScan.scan(this, initialValue, accumulator)); @@ -4256,12 +4438,13 @@ public Observable scan(R initialValue, Func2 accumulator * Returns an Observable that emits a Boolean that indicates whether all of * the items emitted by the source Observable satisfy a condition. *

- * + * * * @param predicate a function that evaluates an item and returns a Boolean * @return an Observable that emits true if all items emitted * by the source Observable satisfy the predicate; otherwise, * false + * @see all() */ public Observable all(Func1 predicate) { return create(OperationAll.all(this, predicate)); @@ -4281,6 +4464,7 @@ public Observable all(Func1 predicate) { * @return an Observable that is identical to the source Observable except * that it does not emit the first num items that the * source emits + * @see skip() */ public Observable skip(int num) { return create(OperationSkip.skip(this, num)); @@ -4294,8 +4478,9 @@ public Observable skip(int num) { * * @return an Observable that emits only the very first item from the * source, or none if the source Observable completes without - * emitting a single item. - * @see MSDN: Observable.First + * emitting a single item + * @see first() + * @see MSDN: Observable.First */ public Observable first() { return take(1); @@ -4310,8 +4495,9 @@ public Observable first() { * @param predicate the condition any source emitted item has to satisfy * @return an Observable that emits only the very first item satisfying the * given condition from the source, or none if the source Observable - * completes without emitting a single matching item. - * @see MSDN: Observable.First + * completes without emitting a single matching item + * @see first() + * @see MSDN: Observable.First */ public Observable first(Func1 predicate) { return skipWhile(not(predicate)).take(1); @@ -4328,7 +4514,8 @@ public Observable first(Func1 predicate) { * @return an Observable that emits only the very first item from the * source, or a default value if the source Observable completes * without emitting a single item - * @see MSDN: Observable.FirstOrDefault + * @see firstOrDefault() + * @see MSDN: Observable.FirstOrDefault */ public Observable firstOrDefault(T defaultValue) { return create(OperationFirstOrDefault.firstOrDefault(this, defaultValue)); @@ -4346,7 +4533,8 @@ public Observable firstOrDefault(T defaultValue) { * doesn't emit anything that satisfies the given condition * @return an Observable that emits only the very first item from the source * that satisfies the given condition, or a default value otherwise - * @see MSDN: Observable.FirstOrDefault + * @see firstOrDefault() + * @see MSDN: Observable.FirstOrDefault */ public Observable firstOrDefault(Func1 predicate, T defaultValue) { return create(OperationFirstOrDefault.firstOrDefault(this, predicate, defaultValue)); @@ -4356,12 +4544,12 @@ public Observable firstOrDefault(Func1 predicate, T defau * Returns the elements of the specified sequence or the specified default * value in a singleton sequence if the sequence is empty. *

- * + * * * @param defaultValue the value to return if the sequence is empty * @return an Observable that emits the specified default value if the * source is empty; otherwise, the items emitted by the source - * + * @see defaultIfEmpty() * @see MSDN: Observable.DefaultIfEmpty */ public Observable defaultIfEmpty(T defaultValue) { @@ -4384,6 +4572,7 @@ public Observable defaultIfEmpty(T defaultValue) { * from the source Observable, or all of the items from the source * Observable if that Observable emits fewer than num * items + * @see take() */ public Observable take(final int num) { return create(OperationTake.take(this, num)); @@ -4393,13 +4582,14 @@ public Observable take(final int num) { * Returns an Observable that emits items emitted by the source Observable * so long as a specified condition is true. *

- * + * * * @param predicate a function that evaluates an item emitted by the source * Observable and returns a Boolean * @return an Observable that emits the items from the source Observable so * long as each item satisfies the condition defined by * predicate + * @see takeWhile() */ public Observable takeWhile(final Func1 predicate) { return create(OperationTakeWhile.takeWhile(this, predicate)); @@ -4410,7 +4600,7 @@ public Observable takeWhile(final Func1 predicate) { * so long as a given predicate remains true, where the predicate can * operate on both the item and its index relative to the complete sequence. *

- * + * * * @param predicate a function to test each item emitted by the source * Observable for a condition; the second parameter of the @@ -4418,6 +4608,7 @@ public Observable takeWhile(final Func1 predicate) { * @return an Observable that emits items from the source Observable so long * as the predicate continues to return true for each * item, then completes + * @see takeWhileWithIndex() */ public Observable takeWhileWithIndex(final Func2 predicate) { return create(OperationTakeWhile.takeWhileWithIndex(this, predicate)); @@ -4431,8 +4622,9 @@ public Observable takeWhileWithIndex(final Func2MSDN: Observable.First + * emitting a single item + * @see first() + * @see MSDN: Observable.First * @see #first() */ public Observable takeFirst() { @@ -4448,8 +4640,9 @@ public Observable takeFirst() { * @param predicate the condition any source emitted item has to satisfy * @return an Observable that emits only the very first item satisfying the * given condition from the source, or none if the source Observable - * completes without emitting a single matching item. - * @see MSDN: Observable.First + * completes without emitting a single matching item + * @see first() + * @see MSDN: Observable.First * @see #first(Func1) */ public Observable takeFirst(Func1 predicate) { @@ -4460,12 +4653,13 @@ public Observable takeFirst(Func1 predicate) { * Returns an Observable that emits only the last count items * emitted by the source Observable. *

- * + * * * @param count the number of items to emit from the end of the sequence * emitted by the source Observable * @return an Observable that emits only the last count items * emitted by the source Observable + * @see takeLast() */ public Observable takeLast(final int count) { return create(OperationTakeLast.takeLast(this, count)); @@ -4475,7 +4669,7 @@ public Observable takeLast(final int count) { * Returns an Observable that emits the items from the source Observable * only until the other Observable emits an item. *

- * + * * * @param other the Observable whose first emitted item will cause * takeUntil to stop emitting items from the @@ -4483,6 +4677,7 @@ public Observable takeLast(final int count) { * @param the type of items emitted by other * @return an Observable that emits the items of the source Observable until * such time as other emits its first item + * @see takeUntil() */ public Observable takeUntil(Observable other) { return OperationTakeUntil.takeUntil(this, other); @@ -4501,7 +4696,8 @@ public Observable takeUntil(Observable other) { * as a second parameter. * @return an Observable that emits all items from the source Observable as * soon as the condition becomes false - * @see MSDN: Observable.SkipWhile + * @see skipWhileWithIndex() + * @see MSDN: Observable.SkipWhile */ public Observable skipWhileWithIndex(Func2 predicate) { return create(OperationSkipWhile.skipWhileWithIndex(this, predicate)); @@ -4518,7 +4714,8 @@ public Observable skipWhileWithIndex(Func2 predi * Observable for a condition * @return an Observable that emits all items from the source Observable as * soon as the condition becomes false - * @see MSDN: Observable.SkipWhile + * @see skipWhile() + * @see MSDN: Observable.SkipWhile */ public Observable skipWhile(Func1 predicate) { return create(OperationSkipWhile.skipWhile(this, predicate)); @@ -4533,15 +4730,14 @@ public Observable skipWhile(Func1 predicate) { * from the front of the queue and produced on the result sequence. This * causes elements to be delayed. *

- * + * * * @param count number of elements to bypass at the end of the source * sequence * @return an Observable sequence emitting the source sequence items * except for the bypassed ones at the end - * * @throws IndexOutOfBoundsException if count is less than zero - * + * @see skipLast() * @see MSDN: Observable.SkipLast */ public Observable skipLast(int count) { @@ -4568,6 +4764,7 @@ public Observable skipLast(int count) { * * @return an Observable that emits a single item: a List containing all of * the items emitted by the source Observable. + * @see toList() */ public Observable> toList() { return create(OperationToObservableList.toObservableList(this)); @@ -4586,6 +4783,7 @@ public Observable> toList() { * all other items emitted by the Observable * @return an Observable that emits the items from the source Observable in * sorted order + * @see toSortedList() */ public Observable> toSortedList() { return create(OperationToObservableSortedList.toSortedList(this)); @@ -4602,6 +4800,7 @@ public Observable> toSortedList() { * indicates their sort order * @return an Observable that emits the items from the source Observable in * sorted order + * @see toSortedList() */ public Observable> toSortedList(Func2 sortFunction) { return create(OperationToObservableSortedList.toSortedList(this, sortFunction)); @@ -4616,6 +4815,7 @@ public Observable> toSortedList(Func2 sor * @param values Iterable of the items you want the modified Observable to * emit first * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(Iterable values) { return concat(Observable. from(values), this); @@ -4627,9 +4827,11 @@ public Observable startWith(Iterable values) { *

* * - * @param values iterable of the items you want the modified Observable to emit first + * @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 startWith() * @see MSDN: Observable.StartWith */ public Observable startWith(Iterable values, Scheduler scheduler) { @@ -4645,6 +4847,7 @@ public Observable startWith(Iterable values, Scheduler scheduler) { * @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 startWith() * @see MSDN: Observable.StartWith */ public Observable startWith(T[] values, Scheduler scheduler) { @@ -4659,6 +4862,7 @@ public Observable startWith(T[] values, Scheduler scheduler) { * * @param t1 item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1) { return concat(Observable. from(t1), this); @@ -4673,6 +4877,7 @@ public Observable startWith(T t1) { * @param t1 first item to emit * @param t2 second item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2) { return concat(Observable. from(t1, t2), this); @@ -4688,6 +4893,7 @@ public Observable startWith(T t1, T t2) { * @param t2 second item to emit * @param t3 third item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3) { return concat(Observable. from(t1, t2, t3), this); @@ -4704,6 +4910,7 @@ public Observable startWith(T t1, T t2, T t3) { * @param t3 third item to emit * @param t4 fourth item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3, T t4) { return concat(Observable. from(t1, t2, t3, t4), this); @@ -4721,6 +4928,7 @@ public Observable startWith(T t1, T t2, T t3, T t4) { * @param t4 fourth item to emit * @param t5 fifth item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3, T t4, T t5) { return concat(Observable. from(t1, t2, t3, t4, t5), this); @@ -4739,6 +4947,7 @@ public Observable startWith(T t1, T t2, T t3, T t4, T t5) { * @param t5 fifth item to emit * @param t6 sixth item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6) { return concat(Observable. from(t1, t2, t3, t4, t5, t6), this); @@ -4758,6 +4967,7 @@ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6) { * @param t6 sixth item to emit * @param t7 seventh item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { return concat(Observable. from(t1, t2, t3, t4, t5, t6, t7), this); @@ -4778,6 +4988,7 @@ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { * @param t7 seventh item to emit * @param t8 eighth item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8) { return concat(Observable. from(t1, t2, t3, t4, t5, t6, t7, t8), this); @@ -4799,6 +5010,7 @@ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8) { * @param t8 eighth item to emit * @param t9 ninth item to emit * @return an Observable that exhibits the modified behavior + * @see startWith() */ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9) { return concat(Observable. from(t1, t2, t3, t4, t5, t6, t7, t8, t9), this); @@ -4809,7 +5021,7 @@ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T * criterion, and emits these grouped items as {@link GroupedObservable}s, * one GroupedObservable per group. *

- * + * * * @param keySelector a function that extracts the key from an item * @param elementSelector a function to map a source item to an item in a @@ -4821,6 +5033,7 @@ public Observable startWith(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T * which corresponds to a unique key value and emits items * representing items from the source Observable that share that key * value + * @see groupBy */ public Observable> groupBy(final Func1 keySelector, final Func1 elementSelector) { return create(OperationGroupBy.groupBy(this, keySelector, elementSelector)); @@ -4831,7 +5044,7 @@ public Observable> groupBy(final Func1 - * + * * * @param keySelector a function that extracts the key for each item * @param the key type @@ -4839,6 +5052,7 @@ public Observable> groupBy(final Func1groupBy */ public Observable> groupBy(final Func1 keySelector) { return create(OperationGroupBy.groupBy(this, keySelector)); @@ -4851,9 +5065,10 @@ public Observable> groupBy(final Func1any operator but renamed in * RxJava to better match Java naming idioms. *

- * + * * * @return an Observable that emits a Boolean + * @see isEmpty() * @see MSDN: Observable.Any */ public Observable isEmpty() { @@ -4865,9 +5080,10 @@ public Observable isEmpty() { * source or an IllegalArgumentException if the source * {@link Observable} is empty. *

- * + * * * @return + * @see last() */ public Observable last() { return create(OperationLast.last(this)); @@ -4887,11 +5103,12 @@ public BlockingObservable toBlockingObservable() { /** * Converts the items emitted by an Observable to the specified type. *

- * + * * * @param klass the target class type which the items will be converted to * @return an Observable that emits each item from the source Observable * converted to the specified type + * @see cast() * @see MSDN: Observable.Cast */ public Observable cast(final Class klass) { @@ -4901,12 +5118,13 @@ public Observable cast(final Class klass) { /** * Filters the items emitted by an Observable based on the specified type. *

- * + * * * @param klass the class type to filter the items emitted by the source * Observable * @return an Observable that emits items from the source Observable of * type klass. + * @see ofClass() * @see MSDN: Observable.OfType */ public Observable ofType(final Class klass) { @@ -4921,11 +5139,11 @@ public Boolean call(T t) { * Ignores all items emitted by an Observable and only calls * onCompleted or onError. *

- * + * * * @return an empty Observable that only calls onCompleted or * onError - * + * @see ignoreElements() * @see MSDN: Observable.IgnoreElements */ public Observable ignoreElements() { @@ -4938,13 +5156,14 @@ public Observable ignoreElements() { * isn't received within the specified timeout duration starting from its * predecessor, a TimeoutException is propagated to the observer. *

- * + * * * @param timeout maximum duration between values before a timeout occurs * @param timeUnit the unit of time which applies to the * timeout argument. * @return the source Observable with a TimeoutException in * case of a timeout + * @see timeout() * @see MSDN: Observable.Timeout */ public Observable timeout(long timeout, TimeUnit timeUnit) { @@ -4958,7 +5177,7 @@ public Observable timeout(long timeout, TimeUnit timeUnit) { * predecessor, the other observable sequence is used to produce future * messages from that point on. *

- * + * * * @param timeout maximum duration between values before a timeout occurs * @param timeUnit the unit of time which applies to the @@ -4966,6 +5185,7 @@ public Observable timeout(long timeout, TimeUnit timeUnit) { * @param other sequence to return in case of a timeout * @return the source sequence switching to the other sequence in case of a * timeout + * @see timeout() * @see MSDN: Observable.Timeout */ public Observable timeout(long timeout, TimeUnit timeUnit, Observable other) { @@ -4978,7 +5198,7 @@ public Observable timeout(long timeout, TimeUnit timeUnit, Observable - * + * * * @param timeout maximum duration between values before a timeout occurs * @param timeUnit the unit of time which applies to the @@ -4986,6 +5206,7 @@ public Observable timeout(long timeout, TimeUnit timeUnit, ObservableTimeoutException in case * of a timeout + * @see timeout() * @see MSDN: Observable.Timeout */ public Observable timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler) { @@ -4999,7 +5220,7 @@ public Observable timeout(long timeout, TimeUnit timeUnit, Scheduler schedule * predecessor, the other observable sequence is used to produce future * messages from that point on. *

- * + * * * @param timeout maximum duration between values before a timeout occurs * @param timeUnit the unit of time which applies to the @@ -5008,6 +5229,7 @@ public Observable timeout(long timeout, TimeUnit timeUnit, Scheduler schedule * @param scheduler Scheduler to run the timeout timers on * @return the source sequence switching to the other sequence in case of a * timeout + * @see timeout() * @see MSDN: Observable.Timeout */ public Observable timeout(long timeout, TimeUnit timeUnit, Observable other, Scheduler scheduler) { @@ -5018,9 +5240,10 @@ public Observable timeout(long timeout, TimeUnit timeUnit, Observable - * + * * * @return an Observable that emits time interval information items + * @see timeInterval() * @see MSDN: Observable.TimeInterval */ public Observable> timeInterval() { @@ -5031,10 +5254,11 @@ public Observable> timeInterval() { * Records the time interval between consecutive items emitted by an * Observable, using the specified Scheduler to compute time intervals. *

- * + * * * @param scheduler Scheduler used to compute time intervals * @return an Observable that emits time interval information items + * @see timeInterval() * @see MSDN: Observable.TimeInterval */ public Observable> timeInterval(Scheduler scheduler) { @@ -5044,13 +5268,14 @@ public Observable> timeInterval(Scheduler scheduler) { /** * Constructs an Observable that depends on a resource object. *

- * + * * * @param resourceFactory the factory function to obtain a resource object * that depends on the Observable * @param observableFactory the factory function to obtain an Observable * @return the Observable whose lifetime controls the lifetime of the * dependent resource object + * @see using() * @see MSDN: Observable.Using */ public static Observable using(Func0 resourceFactory, Func1> observableFactory) { @@ -5060,12 +5285,13 @@ public static Observable using(Func0 - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first * @return an Observable that reflects whichever of the given Observables * reacted first + * @see amb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2) { @@ -5075,13 +5301,14 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first * @param o3 an Observable competing to react first * @return an Observable that reflects whichever of the given Observables * reacted first + * @see amb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3) { @@ -5091,7 +5318,7 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first @@ -5099,6 +5326,7 @@ public static Observable amb(Observable o1, Observableamb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4) { @@ -5108,7 +5336,7 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first @@ -5117,6 +5345,7 @@ public static Observable amb(Observable o1, Observableamb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5) { @@ -5126,7 +5355,7 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first @@ -5136,6 +5365,7 @@ public static Observable amb(Observable o1, Observableamb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6) { @@ -5145,7 +5375,7 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first @@ -5156,6 +5386,7 @@ public static Observable amb(Observable o1, Observableamb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7) { @@ -5165,7 +5396,7 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first @@ -5177,6 +5408,7 @@ public static Observable amb(Observable o1, Observableamb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8) { @@ -5186,7 +5418,7 @@ public static Observable amb(Observable o1, Observable - * + * * * @param o1 an Observable competing to react first * @param o2 an Observable competing to react first @@ -5199,6 +5431,7 @@ public static Observable amb(Observable o1, Observableamb() * @see MSDN: Observable.Amb */ public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9) { @@ -5208,11 +5441,12 @@ public static Observable amb(Observable o1, Observable - * + * * * @param sources Observable sources competing to react first * @return an Observable that reflects whichever of the given Observables * reacted first + * @see amb() * @see MSDN: Observable.Amb */ public static Observable amb(Iterable> sources) { @@ -5223,11 +5457,12 @@ public static Observable amb(Iterable> /** * Invokes an action for each item emitted by the Observable. *

- * + * * * @param observer the action to invoke for each item emitted in the source * sequence * @return the source sequence with the side-effecting behavior applied + * @see doOnEach() * @see MSDN: Observable.Do */ public Observable doOnEach(Observer observer) { @@ -5237,11 +5472,12 @@ public Observable doOnEach(Observer observer) { /** * Invokes an action for each item emitted by an Observable. *

- * + * * * @param onNext the action to invoke for each item in the source * sequence * @return the source sequence with the side-effecting behavior applied + * @see doOnEach() * @see MSDN: Observable.Do */ public Observable doOnEach(final Action1 onNext) { @@ -5266,10 +5502,11 @@ public void onNext(T args) { /** * Invokes an action if onError is called from the Observable. *

- * + * * * @param onError the action to invoke if onError is invoked * @return the source sequence with the side-effecting behavior applied + * @see doOnError() * @see MSDN: Observable.Do */ public Observable doOnError(final Action1 onError) { @@ -5295,11 +5532,12 @@ public void onNext(T args) { } * Invokes an action when onCompleted is called by the * Observable. *

- * + * * * @param onCompleted the action to invoke when onCompleted is * called * @return the source sequence with the side-effecting behavior applied + * @see doOnCompleted() * @see MSDN: Observable.Do */ public Observable doOnCompleted(final Action0 onCompleted) { @@ -5328,6 +5566,7 @@ public void onNext(T args) { } * @param onError the action to invoke when the source Observable calls * onError * @return the source sequence with the side-effecting behavior applied + * @see doOnEach() * @see MSDN: Observable.Do */ public Observable doOnEach(final Action1 onNext, final Action1 onError) { @@ -5351,7 +5590,6 @@ public void onNext(T args) { return create(OperationDoOnEach.doOnEach(this, observer)); } - /** * Invokes an action for each item emitted by an Observable. * @@ -5361,6 +5599,7 @@ public void onNext(T args) { * @param onCompleted the action to invoke when the source Observable calls * onCompleted * @return the source sequence with the side-effecting behavior applied + * @see doOnEach() * @see MSDN: Observable.Do */ public Observable doOnEach(final Action1 onNext, final Action1 onError, final Action0 onCompleted) {