From cebc21b8d88fdd48abd8fb4c2e1f3e7672f498be Mon Sep 17 00:00:00 2001 From: zsxwing Date: Tue, 2 Dec 2014 13:37:06 +0800 Subject: [PATCH 1/3] Fix the height issue of the img tags --- src/main/scala/rx/lang/scala/Observable.scala | 357 +++++++++--------- src/main/scala/rx/lang/scala/Subject.scala | 5 +- .../observables/BlockingObservable.scala | 19 +- .../rx/lang/scala/subjects/AsyncSubject.scala | 4 +- .../lang/scala/subjects/BehaviorSubject.scala | 2 +- .../lang/scala/subjects/PublishSubject.scala | 3 +- .../lang/scala/subjects/ReplaySubject.scala | 3 +- 7 files changed, 195 insertions(+), 198 deletions(-) diff --git a/src/main/scala/rx/lang/scala/Observable.scala b/src/main/scala/rx/lang/scala/Observable.scala index b8aed025..ced82dbb 100755 --- a/src/main/scala/rx/lang/scala/Observable.scala +++ b/src/main/scala/rx/lang/scala/Observable.scala @@ -232,7 +232,7 @@ trait Observable[+T] * Returns an Observable that first emits the items emitted by `this`, and then the items emitted * by `that`. * - * + * * * @param that * an Observable to be appended @@ -248,7 +248,7 @@ trait Observable[+T] /** * Returns an Observable that emits a specified item before it begins to emit items emitted by the source Observable. *

- * + * * * @param elem the item to emit * @return an Observable that emits the specified item before it begins to emit items emitted by the source Observable @@ -280,7 +280,7 @@ trait Observable[+T] * emitted by the source Observable, where that function returns an Observable, and then emitting the items * that result from concatinating those resulting Observables. * - * + * * * @param f a function that, when applied to an item emitted by the source Observable, returns an Observable * @return an Observable that emits the result of applying the transformation function to each item emitted @@ -298,7 +298,7 @@ trait Observable[+T] * Wraps this Observable in another Observable that ensures that the resulting * Observable is chronologically well-behaved. * - * + * * * A well-behaved Observable does not interleave its invocations of the [[rx.lang.scala.Observer.onNext onNext]], [[rx.lang.scala.Observer.onCompleted onCompleted]], and [[rx.lang.scala.Observer.onError onError]] methods of * its [[rx.lang.scala.Observer]]s; it invokes `onCompleted` or `onError` only once; and it never invokes `onNext` after invoking either `onCompleted` or `onError`. @@ -314,7 +314,7 @@ trait Observable[+T] /** * Wraps each item emitted by a source Observable in a timestamped tuple. * - * + * * * @return an Observable that emits timestamped items from the source Observable */ @@ -327,7 +327,7 @@ trait Observable[+T] * Wraps each item emitted by a source Observable in a timestamped tuple * with timestamps provided by the given Scheduler. *

- * + * * * @param scheduler [[rx.lang.scala.Scheduler]] to use as a time source. * @return an Observable that emits timestamped items from the source @@ -355,7 +355,7 @@ trait Observable[+T] * Returns an Observable formed from `this` Observable and `other` Iterable by combining * corresponding elements in pairs. *

- * + * *

* Note that the `other` Iterable is evaluated as items are observed from the source Observable; it is * not pre-consumed. This allows you to zip infinite streams on either side. @@ -371,7 +371,7 @@ trait Observable[+T] * Returns an Observable that emits items that are the result of applying a specified function to pairs of * values, one each from the source Observable and a specified Iterable sequence. *

- * + * *

* Note that the `other` Iterable is evaluated as items are observed from the source Observable; it is * not pre-consumed. This allows you to zip infinite streams on either side. @@ -603,7 +603,7 @@ trait Observable[+T] * Returns an Observable that emits non-overlapping buffered items from the source Observable each time the * specified boundary Observable emits an item. *

- * + * *

* Completion of either the source or the boundary Observable causes the returned Observable to emit the * latest buffer and complete. @@ -624,7 +624,7 @@ trait Observable[+T] * Returns an Observable that emits non-overlapping buffered items from the source Observable each time the * specified boundary Observable emits an item. *

- * + * *

* Completion of either the source or the boundary Observable causes the returned Observable to emit the * latest buffer and complete. @@ -644,7 +644,7 @@ trait Observable[+T] * non-overlapping windows. The boundary of each window is determined by the items emitted from a specified * boundary-governing Observable. * - * + * * * @param boundary an Observable whose emitted items close and open windows. Note: This is a by-name parameter, * so it is only evaluated when someone subscribes to the returned Observable. @@ -846,7 +846,7 @@ trait Observable[+T] * Observable completes or Observable completes or encounters an error, the resulting Observable emits the * current window and propagates the notification from the source Observable. * - * + * * * ===Backpressure Support:=== * This operator does not support backpressure as it uses time to control data flow. @@ -873,7 +873,7 @@ trait Observable[+T] /** * Returns an Observable which only emits those items for which a given predicate holds. * - * + * * * @param predicate * a function that evaluates the items emitted by the source Observable, returning `true` if they pass the filter @@ -887,7 +887,7 @@ trait Observable[+T] /** * Registers an function to be called when this Observable invokes [[rx.lang.scala.Observer.onCompleted onCompleted]] or [[rx.lang.scala.Observer.onError onError]]. * - * + * * * @param action * an function to be invoked when the source Observable finishes @@ -902,7 +902,7 @@ trait Observable[+T] * the source Observable, where that function returns an Observable, and then merging those * resulting Observables and emitting the results of this merger. * - * + * * * @param f * a function that, when applied to an item emitted by the source Observable, returns @@ -921,7 +921,7 @@ trait Observable[+T] * Returns an Observable that applies a function to each item emitted or notification raised by the source * Observable and then flattens the Observables returned from these functions and emits the resulting items. * - * + * * * @tparam R the result type * @param onNext a function that returns an Observable to merge for each item emitted by the source Observable @@ -949,7 +949,7 @@ trait Observable[+T] * Returns an Observable that emits the results of a specified function to the pair of values emitted by the * source Observable and a specified collection Observable. * - * + * * * @tparam U the type of items emitted by the collection Observable * @tparam R the type of items emitted by the resulting Observable @@ -970,7 +970,7 @@ trait Observable[+T] * Returns an Observable that merges each item emitted by the source Observable with the values in an * Iterable corresponding to that item that is generated by a selector. * - * + * * * @tparam R the type of item emitted by the resulting Observable * @param collectionSelector a function that returns an Iterable sequence of values for when given an item emitted by the @@ -989,7 +989,7 @@ trait Observable[+T] * Returns an Observable that emits the results of applying a function to the pair of values from the source * Observable and an Iterable corresponding to that item that is generated by a selector. * - * + * * * @tparam U the collection element type * @tparam R the type of item emited by the resulting Observable @@ -1010,7 +1010,7 @@ trait Observable[+T] * Returns an Observable that applies the given function to each item emitted by an * Observable and emits the result. * - * + * * * @param func * a function to apply to each item emitted by the Observable @@ -1027,7 +1027,7 @@ trait Observable[+T] * Turns all of the notifications from a source Observable into [[rx.lang.scala.Observer.onNext onNext]] emissions, * and marks them with their original notification types within [[rx.lang.scala.Notification]] objects. * - * + * * * @return an Observable whose items are the result of materializing the items and * notifications of the source Observable @@ -1039,7 +1039,7 @@ trait Observable[+T] /** * Asynchronously subscribes and unsubscribes Observers on the specified [[rx.lang.scala.Scheduler]]. * - * + * * * @param scheduler * the [[rx.lang.scala.Scheduler]] to perform subscription and unsubscription actions on @@ -1064,7 +1064,7 @@ trait Observable[+T] /** * Asynchronously notify [[rx.lang.scala.Observer]]s on the specified [[rx.lang.scala.Scheduler]]. * - * + * * * @param scheduler * the [[rx.lang.scala.Scheduler]] to notify [[rx.lang.scala.Observer]]s on @@ -1083,7 +1083,7 @@ trait Observable[+T] * This operation is only available if `this` is of type `Observable[Notification[U]]` for some `U`, * otherwise you will get a compilation error. * - * + * * * @return an Observable that emits the items and notifications embedded in the [[rx.lang.scala.Notification]] objects emitted by the source Observable * @@ -1102,7 +1102,7 @@ trait Observable[+T] /** * Instruct an Observable to pass control to another Observable rather than invoking [[rx.lang.scala.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 [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1133,7 +1133,7 @@ trait Observable[+T] /** * Instruct an Observable to pass control to another Observable rather than invoking [[rx.lang.scala.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 [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1166,7 +1166,7 @@ trait Observable[+T] * * This differs from `Observable.onErrorResumeNext` in that this one does not handle `java.lang.Throwable` or `java.lang.Error` but lets those continue through. * - * + * * * By default, when an Observable encounters an error that prevents it from emitting the * expected item to its [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1198,7 +1198,7 @@ trait Observable[+T] * Instruct an Observable to emit an item (returned by a specified function) rather than * invoking [[rx.lang.scala.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 [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1230,7 +1230,7 @@ trait Observable[+T] * by the source Observable, and emits the final result from the final call to your function as * its sole item. * - * + * * * This technique, which is called "reduce" or "aggregate" here, is sometimes called "fold," * "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, @@ -1252,7 +1252,7 @@ trait Observable[+T] * Returns a [[rx.lang.scala.observables.ConnectableObservable]] that shares a single subscription to the underlying * Observable that will replay all of its items and notifications to any future [[rx.lang.scala.Observer]]. * - * + * * * @return a [[rx.lang.scala.observables.ConnectableObservable]] such that when the `connect` function * is called, the [[rx.lang.scala.observables.ConnectableObservable]] starts to emit items to its [[rx.lang.scala.Observer]]s @@ -1265,7 +1265,7 @@ trait Observable[+T] * Returns an Observable that emits items that are the results of invoking a specified selector on the items * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable. *

- * + * * * @param selector the selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1284,7 +1284,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying `bufferSize` notifications. *

- * + * * * @param selector the selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1305,7 +1305,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying no more than `bufferSize` items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1327,7 +1327,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying no more than `bufferSize` items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1351,7 +1351,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying a maximum of `bufferSize` items. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1373,7 +1373,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying all items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1393,7 +1393,7 @@ trait Observable[+T] * Returns an Observable that emits items that are the results of invoking a specified selector on items * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1413,7 +1413,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays at most `bufferSize` items that were emitted during a specified time window. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @param time the duration of the window in which the replayed items must have been emitted @@ -1428,7 +1428,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * that replays a maximum of `bufferSize` items that are emitted within a specified time window. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @param time the duration of the window in which the replayed items must have been emitted @@ -1446,7 +1446,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying all items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1466,7 +1466,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable that * replays at most `bufferSize` items emitted by that Observable. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @return a `ConnectableObservable` that shares a single subscription to the source Observable and @@ -1480,7 +1480,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays at most `bufferSize` items emitted by that Observable. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @param scheduler the scheduler on which the Observers will observe the emitted items @@ -1495,7 +1495,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays all items emitted by that Observable within a specified time window. *

- * + * * * @param time the duration of the window in which the replayed items must have been emitted * @return a `ConnectableObservable` that shares a single subscription to the source Observable and @@ -1509,7 +1509,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays all items emitted by that Observable within a specified time window. *

- * + * * * @param time the duration of the window in which the replayed items must have been emitted * @param scheduler the Scheduler that is the time source for the window @@ -1524,7 +1524,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable that * will replay all of its items and notifications to any future `Observer` on the given `Scheduler`. *

- * + * * * @param scheduler the Scheduler on which the Observers will observe the emitted items * @return a `ConnectableObservable` that shares a single subscription to the source Observable that @@ -1538,7 +1538,7 @@ trait Observable[+T] * This method has similar behavior to [[rx.lang.scala.Observable.replay]] except that this auto-subscribes to * the source Observable rather than returning a start function and an Observable. * - * + * * * This is useful when you want an Observable to cache responses and you can't control the * subscribe/unsubscribe behavior of all the [[rx.lang.scala.Observer]]s. @@ -1564,7 +1564,7 @@ trait Observable[+T] * Observable rather than returning a [[ConnectableObservable]] for which you must call * `connect` to activate the subscription. *

- * + * *

* This is useful when you want an Observable to cache responses and you can't control the * `subscribe/unsubscribe` behavior of all the [[Subscriber]]s. @@ -1600,7 +1600,7 @@ trait Observable[+T] * * This is an alias for `publish().refCount()` * - * + * * * @return a [[Observable]] that upon connection causes the source Observable to emit items to its [[Subscriber]]s * @since 0.19 @@ -1615,7 +1615,7 @@ trait Observable[+T] * * Note: this method uses `==` to compare elements. It's a bit different from RxJava which uses `Object.equals`. *

- * + * * *@param elem the item to search for in the emissions from the source Observable * @return an Observable that emits `true` if the specified item is emitted by the source Observable, @@ -1630,7 +1630,7 @@ trait Observable[+T] * before it begins emitting items from `this` [[rx.lang.scala.Observable]] to those [[rx.lang.scala.Observer]]s that * have subscribed to it. * - * + * * * @return an [[rx.lang.scala.observables.ConnectableObservable]]. */ @@ -1642,7 +1642,7 @@ trait Observable[+T] * Returns an Observable that emits the results of invoking a specified selector on items emitted by a `ConnectableObservable` * that shares a single subscription to the underlying sequence. *

- * + * * * @param selector a function that can use the multicasted source sequence as many times as needed, without * causing multiple subscriptions to the source sequence. Subscribers to the given source will @@ -1666,7 +1666,7 @@ trait Observable[+T] * source Observable, emitting the final result from the final call to your function as its sole * item. * - * + * * * This technique, which is called "reduce" or "aggregate" here, is sometimes called "fold," * "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, @@ -1690,7 +1690,7 @@ trait Observable[+T] * Returns an Observable that emits the results of sampling the items emitted by the source * Observable at a specified time interval. * - * + * * * @param duration the sampling rate * @return an Observable that emits the results of sampling the items emitted by the source @@ -1704,7 +1704,7 @@ trait Observable[+T] * Returns an Observable that emits the results of sampling the items emitted by the source * Observable at a specified time interval. * - * + * * * @param duration the sampling rate * @param scheduler @@ -1720,7 +1720,7 @@ trait Observable[+T] * Return an Observable that emits the results of sampling the items emitted by the source Observable * whenever the specified sampler Observable emits an item or completes. * - * + * * * @param sampler * the Observable to use for sampling the source Observable @@ -1737,7 +1737,7 @@ trait Observable[+T] * by an Observable into the same function, and so on until all items have been emitted by the * source Observable, emitting the result of each of these iterations. * - * + * * * This sort of function is sometimes called an accumulator. * @@ -1765,7 +1765,7 @@ trait Observable[+T] * same function, and so on until all items have been emitted by the source * Observable, emitting the result of each of these iterations. *

- * + * *

* * @param accumulator @@ -1786,7 +1786,7 @@ trait Observable[+T] * 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 @@ -1801,7 +1801,7 @@ trait Observable[+T] * Returns an Observable that skips the first `num` items emitted by the source * Observable and emits the remainder. * - * + * * * @param n * the number of items to skip @@ -1816,7 +1816,7 @@ trait Observable[+T] * Returns an Observable that drops values emitted by the source Observable before a specified time window * elapses. * - * + * * * @param time the length of the time window to drop * @return an Observable that drops values emitted by the source Observable before the time window defined @@ -1830,7 +1830,7 @@ trait Observable[+T] * Returns an Observable that drops values emitted by the source Observable before a specified time window * elapses. * - * + * * * @param time the length of the time window to drop * @param scheduler the `Scheduler` on which the timed wait happens @@ -1845,7 +1845,7 @@ trait Observable[+T] * Returns an Observable that bypasses all items from the source Observable as long as the specified * condition holds true. Emits all further source items as soon as the condition becomes false. * - * + * * * @param predicate * A function to test each item emitted from the source Observable for a condition. @@ -1860,7 +1860,7 @@ trait Observable[+T] * Returns an Observable that drops a specified number of items from the end of the sequence emitted by the * source Observable. *

- * + * *

* This Observer accumulates a queue long enough to store the first `n` items. As more items are * received, items are taken from the front of the queue and emitted by the returned Observable. This causes @@ -1879,7 +1879,7 @@ trait Observable[+T] * Returns an Observable that drops items emitted by the source Observable during a specified time window * before the source completes. *

- * + * * * Note: this action will cache the latest items arriving in the specified time window. * @@ -1895,7 +1895,7 @@ trait Observable[+T] * Returns an Observable that drops items emitted by the source Observable during a specified time window * (defined on a specified scheduler) before the source completes. *

- * + * * * Note: this action will cache the latest items arriving in the specified time window. * @@ -1911,7 +1911,7 @@ trait Observable[+T] /** * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. *

- * + * * * @param other the second Observable that has to emit an item before the source Observable's elements begin * to be mirrored by the resulting Observable @@ -1928,7 +1928,7 @@ trait Observable[+T] * Returns an Observable that emits only the first `num` items emitted by the source * Observable. * - * + * * * This method returns an Observable that will invoke a subscribing [[rx.lang.scala.Observer]]'s * [[rx.lang.scala.Observer.onNext onNext]] function a maximum of `num` times before invoking @@ -1947,7 +1947,7 @@ trait Observable[+T] /** * Returns an Observable that emits those items emitted by source Observable before a specified time runs out. *

- * + * * * @param time the length of the time window * @return an Observable that emits those items emitted by the source Observable before the time runs out @@ -1960,7 +1960,7 @@ trait Observable[+T] * Returns an Observable that emits those items emitted by source Observable before a specified time (on * specified Scheduler) runs out *

- * + * * * @param time the length of the time window * @param scheduler the Scheduler used for time source @@ -1975,7 +1975,7 @@ trait Observable[+T] * 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 @@ -1991,7 +1991,7 @@ trait Observable[+T] * 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 @@ -2007,7 +2007,7 @@ trait Observable[+T] * Return an Observable that emits the items from the source Observable that were emitted in a specified * window of `time` before the Observable completed. *

- * + * * * @param time the length of the time window * @return an Observable that emits the items from the source Observable that were emitted in the window of @@ -2022,7 +2022,7 @@ trait Observable[+T] * window of `time` before the Observable completed, where the timing information is provided by a specified * Scheduler. *

- * + * * * @param time the length of the time window * @param scheduler the Scheduler that provides the timestamps for the Observed items @@ -2038,7 +2038,7 @@ trait Observable[+T] * Return an Observable that emits at most a specified number of items from the source Observable that were * emitted in a specified window of time before the Observable completed. *

- * + * * * @param count the maximum number of items to emit * @param time the length of the time window @@ -2055,7 +2055,7 @@ trait Observable[+T] * emitted in a specified window of `time` before the Observable completed, where the timing information is * provided by a given Scheduler. *

- * + * * * @param count the maximum number of items to emit * @param time the length of the time window @@ -2073,7 +2073,7 @@ trait Observable[+T] * Returns an Observable that emits the items from the source Observable only until the * `other` Observable emits an item. * - * + * * * @param that * the Observable whose first emitted item will cause `takeUntil` to stop @@ -2089,7 +2089,7 @@ trait Observable[+T] * Returns an Observable that emits a single item, a list composed of all the items emitted by * the source Observable. * - * + * * * Normally, an Observable that returns multiple items will do so by invoking its [[rx.lang.scala.Observer]]'s * [[rx.lang.scala.Observer.onNext onNext]] method for each such item. You can change @@ -2128,7 +2128,7 @@ trait Observable[+T] * Groups the items emitted by an [[Observable]] according to a specified criterion, and emits these * grouped items as `(key, observable)` pairs. * - * + * * * Note: A `(key, observable)` will cache the items it is to emit until such time as it * is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore those @@ -2162,7 +2162,7 @@ trait Observable[+T] /** * Correlates the items emitted by two Observables based on overlapping durations. *

- * + * * * @param other * the second Observable to join items from @@ -2200,7 +2200,7 @@ trait Observable[+T] /** * Returns an Observable that correlates two Observables when they overlap in time and groups the results. * - * + * * * @param other the other Observable to correlate items from the source Observable with * @param leftDuration a function that returns an Observable whose emissions indicate the duration of the values of @@ -2232,7 +2232,7 @@ trait Observable[+T] * Observable that returns an Observable, and then emitting the items emitted by the most recently emitted * of these Observables. * - * + * * * @param f a function that, when applied to an item emitted by the source Observable, returns an Observable * @return an Observable that emits the items emitted by the Observable returned from applying a function to @@ -2248,7 +2248,7 @@ trait Observable[+T] * Given an Observable that emits Observables, creates a single Observable that * emits the items emitted by the most recently published of those Observables. * - * + * * * This operation is only available if `this` is of type `Observable[Observable[U]]` for some `U`, * otherwise you'll get a compilation error. @@ -2271,7 +2271,7 @@ trait Observable[+T] /** * Flattens two Observables into one Observable, without any transformation. * - * + * * * You can combine items emitted by two Observables so that they act like a single * Observable by using the `merge` method. @@ -2293,7 +2293,7 @@ trait Observable[+T] * refrain from propagating that error notification until all of the merged Observables have * finished emitting items. * - * + * * * Even if multiple merged Observables send `onError` notifications, `mergeDelayError` will only invoke the `onError` method of its * Observers once. @@ -2314,7 +2314,7 @@ trait Observable[+T] * Flattens the sequence of Observables emitted by `this` into one Observable, without any * transformation. * - * + * * * You can combine the items emitted by multiple Observables so that they act like a single * Observable by using this method. @@ -2341,7 +2341,7 @@ trait Observable[+T] * those Observables, without any transformation, while limiting the maximum number of concurrent * subscriptions to these Observables. * - * + * * * You can combine the items emitted by multiple Observables so that they appear as a single Observable, by * using the `flatten` method. @@ -2364,7 +2364,7 @@ trait Observable[+T] * refrain from propagating that error notification until all of the merged Observables have * finished emitting items. * - * + * * * Even if multiple merged Observables send `onError` notifications, this method will only invoke the `onError` method of its * Observers once. @@ -2421,7 +2421,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * $debounceVsThrottle * @@ -2439,7 +2439,7 @@ trait Observable[+T] * Return an Observable that mirrors the source Observable, except that it drops items emitted by the source * Observable that are followed by another item within a computed debounce duration. * - * + * * * @param debounceSelector function to retrieve a sequence that indicates the throttle duration for each item * @return an Observable that omits items emitted by the source Observable that are followed by another item @@ -2457,7 +2457,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * $debounceVsThrottle * @@ -2476,7 +2476,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * $debounceVsThrottle * @@ -2496,7 +2496,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * @param timeout * The time each value has to be 'the most recent' of the [[rx.lang.scala.Observable]] to ensure that it's not dropped. @@ -2514,7 +2514,7 @@ trait Observable[+T] * * This differs from `Observable.throttleLast` in that this only tracks passage of time whereas `Observable.throttleLast` ticks at scheduled intervals. * - * + * * * @param skipDuration * Time to wait before sending another value after emitting last value. @@ -2531,7 +2531,7 @@ trait Observable[+T] * * This differs from `Observable.throttleLast` in that this only tracks passage of time whereas `Observable.throttleLast` ticks at scheduled intervals. * - * + * * * @param skipDuration * Time to wait before sending another value after emitting last value. @@ -2546,7 +2546,7 @@ trait Observable[+T] * * This differs from `Observable.throttleFirst` in that this ticks along at a scheduled interval whereas `Observable.throttleFirst` does not tick, it just tracks passage of time. * - * + * * * @param intervalDuration * Duration of windows within with the last value will be chosen. @@ -2561,7 +2561,7 @@ trait Observable[+T] * * This differs from `Observable.throttleFirst` in that this ticks along at a scheduled interval whereas `Observable.throttleFirst` does not tick, it just tracks passage of time. * - * + * * * @param intervalDuration * Duration of windows within with the last value will be chosen. @@ -2577,7 +2577,7 @@ trait Observable[+T] * observed within the specified timeout duration starting from its * predecessor, observers are notified of a `TimeoutException`. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @return the source Observable modified to notify observers of a @@ -2594,7 +2594,7 @@ trait Observable[+T] * predecessor, a specified fallback Observable produces future items and * notifications from that point on. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @param other fallback Observable to use in case of a timeout @@ -2613,7 +2613,7 @@ trait Observable[+T] * observed within the specified timeout duration starting from its * predecessor, the observer is notified of a `TimeoutException`. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @param scheduler Scheduler to run the timeout timers on @@ -2631,7 +2631,7 @@ trait Observable[+T] * predecessor, a specified fallback Observable sequence produces future * items and notifications from that point on. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @param other Observable to use as the fallback in case of a timeout @@ -2651,7 +2651,7 @@ trait Observable[+T] * previous item, where that period of time is measured by an Observable that is a function * of the previous item. *

- * + * *

* Note: The arrival of the first source item is never timed out. * @@ -2672,7 +2672,7 @@ trait Observable[+T] * after the emission of the previous item, where that period of time is measured by an * Observable that is a function of the previous item. *

- * + * *

* Note: The arrival of the first source item is never timed out. * @@ -2697,7 +2697,7 @@ trait Observable[+T] * if either the first item emitted by the source Observable or any subsequent item * don't arrive within time windows defined by other Observables. *

- * + * *

* @param firstTimeoutSelector * a function that returns an Observable that determines the timeout window for the @@ -2720,7 +2720,7 @@ trait Observable[+T] * Observable if either the first item emitted by the source Observable or any subsequent item * don't arrive within time windows defined by other Observables. *

- * + * *

* @param firstTimeoutSelector * a function that returns an Observable which determines the timeout window for the @@ -2778,7 +2778,7 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or * a default value if the source Observable is empty. * - * + * * * @param default * The default value to emit if the source Observable doesn't emit anything. @@ -2794,7 +2794,7 @@ trait Observable[+T] * Returns an Observable that emits only an `Option` with the very first item emitted by the source Observable, * or `None` if the source Observable is empty. * - * + * * * @return an Observable that emits only an `Option` with the very first item from the source, or `None` * if the source Observable completes without emitting any item. @@ -2807,7 +2807,7 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or * a default value if the source Observable is empty. * - * + * * * @param default * The default value to emit if the source Observable doesn't emit anything. @@ -2821,7 +2821,7 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty. *

- * + * * * @return an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty @@ -2836,7 +2836,7 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty. *

- * + * * * @return an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty @@ -2887,7 +2887,7 @@ trait Observable[+T] * Returns an Observable that emits the last item emitted by the source Observable or notifies observers of * an `NoSuchElementException` if the source Observable is empty. * - * + * * * @return an Observable that emits the last item from the source Observable or notifies observers of an * error @@ -2902,7 +2902,7 @@ trait Observable[+T] * Returns an Observable that emits only an `Option` with the last item emitted by the source Observable, * or `None` if the source Observable completes without emitting any items. * - * + * * * @return an Observable that emits only an `Option` with the last item emitted by the source Observable, * or `None` if the source Observable is empty @@ -2915,7 +2915,7 @@ trait Observable[+T] * Returns an Observable that emits only the last item emitted by the source Observable, or a default item * if the source Observable completes without emitting any items. * - * + * * * @param default the default item to emit if the source Observable is empty. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -2931,7 +2931,7 @@ trait Observable[+T] * item. If the source Observable emits more than one item or no items, notify of an `IllegalArgumentException` * or `NoSuchElementException` respectively. * - * + * * * @return an Observable that emits the single item emitted by the source Observable * @throws IllegalArgumentException if the source emits more than one item @@ -2948,7 +2948,7 @@ trait Observable[+T] * with that item; if the source Observable is empty, return an Observable that emits `None`. * If the source Observable emits more than one item, throw an `IllegalArgumentException`. * - * + * * * @return an Observable that emits an `Option` with the single item emitted by the source Observable, or * `None` if the source Observable is empty @@ -2964,7 +2964,7 @@ trait Observable[+T] * item; if the source Observable is empty, return an Observable that emits a default item. If the source * Observable emits more than one item, throw an `IllegalArgumentException`. * - * + * * * @param default a default value to emit if the source Observable emits no item. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -2983,7 +2983,7 @@ trait Observable[+T] * Returns an Observable that emits the items emitted by the source Observable or a specified default item * if the source Observable is empty. * - * + * * * @param default the item to emit if the source Observable emits no items. This is a by-name parameter, so it is * only evaluated if the source Observable doesn't emit anything. @@ -3002,7 +3002,7 @@ trait Observable[+T] /** * Returns an Observable that forwards all sequentially distinct items emitted from the source Observable. * - * + * * * @return an Observable of sequentially distinct items */ @@ -3014,7 +3014,7 @@ trait Observable[+T] * Returns an Observable that forwards all items emitted from the source Observable that are sequentially * distinct according to a key selector function. * - * + * * * @param keySelector * a function that projects an emitted item to a key value which is used for deciding whether an item is sequentially @@ -3028,7 +3028,7 @@ trait Observable[+T] /** * Returns an Observable that forwards all distinct items emitted from the source Observable. * - * + * * * @return an Observable of distinct items */ @@ -3040,7 +3040,7 @@ trait Observable[+T] * Returns an Observable that forwards all items emitted from the source Observable that are distinct according * to a key selector function. * - * + * * * @param keySelector * a function that projects an emitted item to a key value which is used for deciding whether an item is @@ -3054,7 +3054,7 @@ trait Observable[+T] /** * Returns an Observable that counts the total number of elements in the source Observable. * - * + * * * @return an Observable emitting the number of counted elements of the source Observable * as its single item. @@ -3066,7 +3066,7 @@ trait Observable[+T] /** * Returns an Observable that counts the total number of elements in the source Observable. * - * + * * * @return an Observable emitting the number of counted elements of the source Observable * as its single item. @@ -3076,7 +3076,7 @@ trait Observable[+T] /** * Retry subscription to origin Observable upto given retry count. * - * + * * * If [[rx.lang.scala.Observer.onError]] is invoked the source Observable will be re-subscribed to as many times as defined by retryCount. * @@ -3096,7 +3096,7 @@ trait Observable[+T] /** * Retry subscription to origin Observable whenever onError is called (infinite retry count). * - * + * * * If [[rx.lang.scala.Observer.onError]] is invoked the source Observable will be re-subscribed to. * @@ -3114,7 +3114,7 @@ trait Observable[+T] * Returns an Observable that mirrors the source Observable, resubscribing to it if it calls `onError` * and the predicate returns true for that specific exception and retry count. * - * + * * * @param predicate the predicate that determines if a resubscription may happen in case of a specific exception and retry count * @return the source Observable modified with retry logic @@ -3134,7 +3134,7 @@ trait Observable[+T] * `onCompleted` or `onError` on the child subscription. Otherwise, this Observable will * resubscribe to the source Observable. *

- * + * * * Example: * @@ -3196,7 +3196,7 @@ trait Observable[+T] * func. If the Observable returned `onCompletes` or `onErrors` then retry will call `onCompleted` * or `onError` on the child subscription. Otherwise, this observable will resubscribe to the source observable, on a particular Scheduler. *

- * + * *

*

*
Scheduler:
@@ -3224,7 +3224,7 @@ trait Observable[+T] /** * Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely. *

- * + * * * @return an Observable that emits the items emitted by the source Observable repeatedly and in sequence * @see RxJava Wiki: repeat() @@ -3238,7 +3238,7 @@ trait Observable[+T] * Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely, * on a particular Scheduler. *

- * + * * * @param scheduler the Scheduler to emit the items on * @return an Observable that emits the items emitted by the source Observable repeatedly and in sequence @@ -3252,7 +3252,7 @@ trait Observable[+T] /** * Returns an Observable that repeats the sequence of items emitted by the source Observable at most `count` times. *

- * + * * * @param count the number of times the source Observable items are repeated, * a count of 0 will yield an empty sequence @@ -3269,7 +3269,7 @@ trait Observable[+T] * Returns an Observable that repeats the sequence of items emitted by the source Observable * at most `count` times, on a particular Scheduler. *

- * + * * * @param count the number of times the source Observable items are repeated, * a count of 0 will yield an empty sequence @@ -3291,7 +3291,7 @@ trait Observable[+T] * call `onCompleted` or `onError` on the child subscription. Otherwise, this Observable will * resubscribe to the source Observable, on a particular Scheduler. *

- * + * *

*
Scheduler:
*
you specify which [[Scheduler]] this operator will use
@@ -3322,7 +3322,7 @@ trait Observable[+T] * call `onCompleted` or `onError` on the child subscription. Otherwise, this Observable will * resubscribe to the source observable. *

- * + * * * @example * @@ -3497,7 +3497,7 @@ trait Observable[+T] * source `Observable` is reference counted, in which case the source `Observable` will invoke * the given action for the first subscription. *

- * + * *

*
Scheduler:
*
`onSubscribe` does not operate by default on a particular `Scheduler`.
@@ -3516,7 +3516,7 @@ trait Observable[+T] /** * Modifies an Observable so that it invokes an action when it calls `onCompleted` or `onError`. *

- * + * *

* This differs from `finallyDo` in that this happens **before** `onCompleted/onError` are emitted. * @@ -3535,7 +3535,7 @@ trait Observable[+T] * source `Observable` is reference counted, in which case the source `Observable` will invoke * the given action for the very last un-subscription. *

- * + * *

*
Scheduler:
*
`doOnUnsubscribe` does not operate by default on a particular `Scheduler`.
@@ -3554,7 +3554,7 @@ trait Observable[+T] /** * Given two Observables, mirror the one that first emits an item. * - * + * * * @param that * an Observable competing to react first @@ -3570,7 +3570,7 @@ trait Observable[+T] * Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a * specified delay. Error notifications from the source Observable are not delayed. * - * + * * * @param delay the delay to shift the source by * @return the source Observable shifted in time by the specified delay @@ -3583,7 +3583,7 @@ trait Observable[+T] * Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a * specified delay. Error notifications from the source Observable are not delayed. * - * + * * * @param delay the delay to shift the source by * @param scheduler the Scheduler to use for delaying @@ -3597,7 +3597,7 @@ trait Observable[+T] * Returns an Observable that delays the emissions of the source Observable via another Observable on a * per-item basis. *

- * + * *

* Note: the resulting Observable will immediately propagate any `onError` notification * from the source Observable. @@ -3619,7 +3619,7 @@ trait Observable[+T] * Returns an Observable that delays the subscription to and emissions from the souce Observable via another * Observable on a per-item basis. *

- * + * *

* Note: the resulting Observable will immediately propagate any `onError` notification * from the source Observable. @@ -3647,7 +3647,7 @@ trait Observable[+T] /** * Return an Observable that delays the subscription to the source Observable by a given amount of time. * - * + * * * @param delay the time to delay the subscription * @return an Observable that delays the subscription to the source Observable by the given amount @@ -3660,7 +3660,7 @@ trait Observable[+T] * Return an Observable that delays the subscription to the source Observable by a given amount of time, * both waiting and subscribing on a given Scheduler. * - * + * * * @param delay the time to delay the subscription * @param scheduler the Scheduler on which the waiting and subscription will happen @@ -3675,7 +3675,7 @@ trait Observable[+T] * Returns an Observable that delays the subscription to the source Observable until a second Observable * emits an item. *

- * + * *

*
Scheduler:
*
This version of `delay` operates by default on the `computation` `Scheduler`.
@@ -3701,7 +3701,7 @@ trait Observable[+T] * Returns an Observable that emits the single item at a specified index in a sequence of emissions from a * source Observbable. * - * + * * * @param index * the zero-based index of the item to retrieve @@ -3719,7 +3719,7 @@ trait Observable[+T] * Returns an Observable that emits the item found at a specified index in a sequence of emissions from a * source Observable, or a default item if that index is out of range. * - * + * * * @param index * the zero-based index of the item to retrieve @@ -3739,7 +3739,7 @@ trait Observable[+T] * Return an Observable that emits a single Map containing all items emitted by the source Observable, * mapped by the keys returned by a specified `keySelector` function. *

- * + * *

* If more than one source item maps to the same key, the Map will contain the latest of those items. * @@ -3758,7 +3758,7 @@ trait Observable[+T] * Return an Observable that emits a single Map containing values corresponding to items emitted by the * source Observable, mapped by the keys returned by a specified `keySelector` function. *

- * + * *

* If more than one source item maps to the same key, the Map will contain a single entry that * corresponds to the latest of those items. @@ -3780,7 +3780,7 @@ trait Observable[+T] * Return an Observable that emits a single Map, returned by a specified `mapFactory` function, that * contains keys and values extracted from the items emitted by the source Observable. *

- * + * * * @param keySelector * the function that extracts the key from a source item to be used in the Map @@ -3801,7 +3801,7 @@ trait Observable[+T] * Returns an Observable that emits a Boolean value that indicates whether `this` and `that` Observable sequences are the * same by comparing the items emitted by each Observable pairwise. *

- * + * * * Note: this method uses `==` to compare elements. It's a bit different from RxJava which uses `Object.equals`. * @@ -3816,7 +3816,7 @@ trait Observable[+T] * Returns an Observable that emits a Boolean value that indicates whether `this` and `that` Observable sequences are the * same by comparing the items emitted by each Observable pairwise based on the results of a specified `equality` function. *

- * + * * * @param that the Observable to compare * @param equality a function used to compare items emitted by each Observable @@ -3833,7 +3833,7 @@ trait Observable[+T] * Returns an Observable that emits records of the time interval between consecutive items emitted by the * source Obsegrvable. *

- * + * * * @return an Observable that emits time interval information items */ @@ -3846,7 +3846,7 @@ trait Observable[+T] * Returns an Observable that emits records of the time interval between consecutive items emitted by the * source Observable, where this interval is computed on a specified Scheduler. *

- * + * * * @param scheduler the [[Scheduler]] used to compute time intervals * @return an Observable that emits time interval information items @@ -3886,7 +3886,7 @@ trait Observable[+T] /** * Converts the source `Observable[T]` into an `Observable[Observable[T]]` that emits the source Observable as its single emission. * - * + * * * @return an Observable that emits a single item: the source Observable */ @@ -3940,7 +3940,7 @@ trait Observable[+T] * Returns an Observable that counts the total number of items emitted by the source Observable and emits * this count as a 64-bit Long. *

- * + * *

*
Backpressure Support:
*
This operator does not support backpressure because by intent it will receive all values and reduce @@ -3963,7 +3963,7 @@ trait Observable[+T] * Returns an Observable that emits a single `Map` that contains an `Seq` of items emitted by the * source Observable keyed by a specified `keySelector` function. * - * + * * * @param keySelector the function that extracts the key from the source items to be used as key in the HashMap * @return an Observable that emits a single item: a `Map` that contains an `Seq` of items mapped from @@ -3978,7 +3978,7 @@ trait Observable[+T] * specified `valueSelector` function from items emitted by the source Observable, keyed by a * specified `keySelector` function. * - * + * * * @param keySelector the function that extracts a key from the source items to be used as key in the HashMap * @param valueSelector the function that extracts a value from the source items to be used as value in the HashMap @@ -3994,7 +3994,7 @@ trait Observable[+T] * contains values, extracted by a specified `valueSelector` function from items emitted by the source Observable and * keyed by the `keySelector` function. `mutable.Map[K, B]` is the same instance create by `mapFactory`. * - * + * * * @param keySelector the function that extracts a key from the source items to be used as the key in the Map * @param valueSelector the function that extracts a value from the source items to be used as the value in the Map @@ -4011,7 +4011,7 @@ trait Observable[+T] * contains values extracted by a specified `valueSelector` function from items emitted by the source Observable, and * keyed by the `keySelector` function. `mutable.Map[K, B]` is the same instance create by `mapFactory`. * - * + * * * @param keySelector the function that extracts a key from the source items to be used as the key in the Map * @param valueSelector the function that extracts a value from the source items to be used as the value in the Map @@ -4245,7 +4245,7 @@ trait Observable[+T] * Instructs an Observable that is emitting items faster than its observer can consume them to buffer these * items indefinitely until they can be emitted. * - * + * * * ===Scheduler:=== * `onBackpressureBuffer` does not operate by default on a particular `Scheduler`. @@ -4261,7 +4261,7 @@ trait Observable[+T] * Use this operator when the upstream does not natively support backpressure and you wish to drop * `onNext` when unable to handle further events. * - * + * * * If the downstream request count hits 0 then `onNext` will be dropped until `request(long n)` * is invoked again to increase the request count. @@ -4318,7 +4318,7 @@ object Observable { /** * Creates an Observable that will execute the given function when an [[rx.lang.scala.Observer]] subscribes to it. * - * + * * * Write the function you pass to `create` so that it behaves as an Observable: It * should invoke the Observer's [[rx.lang.scala.Observer.onNext onNext]], [[rx.lang.scala.Observer.onError onError]], and [[rx.lang.scala.Observer.onCompleted onCompleted]] methods @@ -4363,7 +4363,7 @@ object Observable { /** * Returns an Observable that will execute the specified function when someone subscribes to it. * - * + * * * Write the function you pass so that it behaves as an Observable: It should invoke the * Subscriber's `onNext`, `onError`, and `onCompleted` methods appropriately. @@ -4396,7 +4396,7 @@ object Observable { * Returns an Observable that invokes an [[rx.lang.scala.Observer]]'s [[rx.lang.scala.Observer.onError onError]] * method when the Observer subscribes to it. * - * + * * * @param exception * the particular error to report @@ -4414,7 +4414,7 @@ object Observable { * immediately invokes its [[rx.lang.scala.Observer#onCompleted onCompleted]] method * with the specified scheduler. *

- * + * * * @return an Observable that returns no data to the [[rx.lang.scala.Observer]] and * immediately invokes the [[rx.lang.scala.Observer]]r's @@ -4430,7 +4430,7 @@ object Observable { /** * Converts a sequence of values into an Observable. * - * + * * * Implementation note: the entire array will be immediately emitted each time an [[rx.lang.scala.Observer]] subscribes. * Since this occurs before the [[rx.lang.scala.Subscription]] is returned, @@ -4468,7 +4468,7 @@ object Observable { /** * Converts an `Iterable` into an Observable. * - * + * * * Note: the entire iterable sequence is immediately emitted each time an * Observer subscribes. Since this occurs before the @@ -4490,7 +4490,7 @@ object Observable { * new Observer that subscribes. That is, for each subscriber, the actual 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. This allows an [[rx.lang.scala.Observer]] to easily @@ -4511,7 +4511,7 @@ object Observable { /** * Returns an Observable that never sends any items or notifications to an [[rx.lang.scala.Observer]]. * - * + * * * This Observable is useful primarily for testing purposes. * @@ -4569,7 +4569,7 @@ object Observable { /** * Emits `0`, `1`, `2`, `...` with a delay of `duration` between consecutive numbers. * - * + * * * @param duration * duration between two consecutive numbers @@ -4582,7 +4582,7 @@ object Observable { /** * Emits `0`, `1`, `2`, `...` with a delay of `duration` between consecutive numbers. * - * + * * * @param period * duration between two consecutive numbers @@ -4598,7 +4598,7 @@ object Observable { * Return an Observable that emits a 0L after the `initialDelay` and ever increasing * numbers after each `period` of time thereafter, on a specified Scheduler. *

- * + * * * @param initialDelay * the initial delay time to wait before emitting the first value of 0L @@ -4615,7 +4615,7 @@ object Observable { * Return an Observable that emits a 0L after the `initialDelay` and ever increasing * numbers after each `period` of time thereafter, on a specified Scheduler. *

- * + * * * @param initialDelay * the initial delay time to wait before emitting the first value of 0L @@ -4633,7 +4633,7 @@ object Observable { /** * Returns an Observable that emits `0L` after a specified delay, and then completes. * - * + * * * @param delay the initial delay before emitting a single `0L` * @return Observable that emits `0L` after a specified delay, and then completes @@ -4646,7 +4646,7 @@ object Observable { * Returns an Observable that emits `0L` after a specified delay, on a specified Scheduler, and then * completes. * - * + * * * @param delay the initial delay before emitting a single `0L` * @param scheduler the Scheduler to use for scheduling the item @@ -4685,7 +4685,7 @@ object Observable { /** * Mirror the one Observable in an Iterable of several Observables that first emits an item. * - * + * * * @param sources an Iterable of Observable sources competing to react first * @return an Observable that emits the same sequence of items as whichever of the source Observables @@ -4716,8 +4716,3 @@ object Observable { } } - - - - - diff --git a/src/main/scala/rx/lang/scala/Subject.scala b/src/main/scala/rx/lang/scala/Subject.scala index 2550d757..3a96a140 100644 --- a/src/main/scala/rx/lang/scala/Subject.scala +++ b/src/main/scala/rx/lang/scala/Subject.scala @@ -39,7 +39,7 @@ trait Subject[T] extends Observable[T] with Observer[T] { * Subject that, once an `Observer` has subscribed, emits all subsequently observed items to the * subscriber. *

- * + * *

* @example {{{ @@ -61,4 +61,5 @@ object Subject { * @return the new `Subject` */ def apply[T](): Subject[T] = new rx.lang.scala.subjects.PublishSubject[T](rx.subjects.PublishSubject.create()) -} \ No newline at end of file +} + diff --git a/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala b/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala index 6dd2ab83..259150c5 100644 --- a/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala +++ b/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala @@ -42,7 +42,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * This is similar to {@link Observable#subscribe(Observer)}, but it blocks. Because it blocks it does * not need the {@link Observer#onCompleted()} or {@link Observer#onError(Throwable)} methods. * - * + * * * @param f * the {@link Action1} to invoke for every item emitted by the {@link Observable} @@ -61,7 +61,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * Returns the last item emitted by a specified [[Observable]], or * throws `NoSuchElementException` if it emits no items. * - * + * * * @return the last item emitted by the source [[Observable]] * @throws NoSuchElementException @@ -88,7 +88,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * Returns the last item emitted by the source Observable, or a default item * if the source Observable completes without emitting any items. * - * + * * * @param default the default item to emit if the source Observable is empty. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -139,7 +139,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) /** * Returns the very first item emitted by the source Observable, or a default value if the source Observable is empty. * - * + * * * @param default The default value to emit if the source Observable doesn't emit anything. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -152,7 +152,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) /** * Returns an {@link Iterable} that always returns the item most recently emitted by an {@link Observable}. *

- * + * * * @param initialValue * the initial value that will be yielded by the {@link Iterable} sequence if the {@link Observable} has not yet emitted an item @@ -167,7 +167,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * Returns an {@link Iterable} that blocks until the {@link Observable} emits another item, * then returns that item. *

- * + * * * @return an {@link Iterable} that blocks upon each iteration until the {@link Observable} emits a new item, whereupon the Iterable returns that item */ @@ -179,7 +179,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * If the source Observable completes after emitting a single item, return that item. If the source Observable * emits more than one item or no items, notify of an `IllegalArgumentException` or `NoSuchElementException` respectively. * - * + * * * @return an Observable that emits the single item emitted by the source Observable * @throws IllegalArgumentException if the source emits more than one item @@ -207,7 +207,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * if the source Observable is empty, return a default item. If the source Observable * emits more than one item, throw an `IllegalArgumentException`. * - * + * * * @param default a default value to emit if the source Observable emits no item. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -256,7 +256,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * is empty. Use `Observable.toSeq.toBlocking.toFuture` if you are not sure about the size of `BlockingObservable` * and do not want to handle these `Exception`s. * - * + * * * @return a `Future` that expects a single item to be emitted by this `BlockingObservable`. */ @@ -285,4 +285,3 @@ private[observables] class WithFilter[+T] (p: T => Boolean, asJava: rx.observabl } - diff --git a/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala b/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala index 54d2703e..1cd18cc2 100644 --- a/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala @@ -21,7 +21,7 @@ import rx.lang.scala.Subject * Subject that publishes only the last item observed to each `Observer` that has subscribed, when the * source `Observable}` completes. *

- * + * *

* @example {{{ @@ -51,4 +51,4 @@ object AsyncSubject { } } -class AsyncSubject[T] private[scala] (val asJavaSubject: rx.subjects.AsyncSubject[T]) extends Subject[T] {} \ No newline at end of file +class AsyncSubject[T] private[scala] (val asJavaSubject: rx.subjects.AsyncSubject[T]) extends Subject[T] {} diff --git a/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala b/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala index c71380ff..9989757c 100644 --- a/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala @@ -21,7 +21,7 @@ import rx.lang.scala.Subject * Subject that emits the most recent item it has observed and all subsequent observed items to each subscribed * `Observer`. *

- * + * *

* @example {{{ diff --git a/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala b/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala index 890c1dc3..28115bbd 100644 --- a/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala @@ -21,7 +21,7 @@ import rx.lang.scala.Subject * Subject that, once an `Observer` has subscribed, emits all subsequently observed items to the * subscriber. *

- * + * *

* @example {{{ @@ -46,3 +46,4 @@ object PublishSubject { } private [scala] class PublishSubject[T] private [scala] (val asJavaSubject: rx.subjects.PublishSubject[T]) extends Subject[T] {} + diff --git a/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala b/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala index 454cfda2..d5012310 100644 --- a/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala @@ -22,7 +22,7 @@ import scala.concurrent.duration.Duration /** * Subject that buffers all items it observes and replays them to any `Observer` that subscribes. *

- * + * *

* @example {{{ @@ -153,3 +153,4 @@ object ReplaySubject { } class ReplaySubject[T] private[scala] (val asJavaSubject: rx.subjects.ReplaySubject[T]) extends Subject[T] {} + From 95d49590db89ecee068f19a545ae5d18e85f269f Mon Sep 17 00:00:00 2001 From: zsxwing Date: Tue, 2 Dec 2014 14:16:08 +0800 Subject: [PATCH 2/3] Fix the file permission --- examples/src/test/scala/rx/lang/scala/examples/RxScalaDemo.scala | 0 src/main/scala/rx/lang/scala/Observable.scala | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 examples/src/test/scala/rx/lang/scala/examples/RxScalaDemo.scala mode change 100755 => 100644 src/main/scala/rx/lang/scala/Observable.scala diff --git a/examples/src/test/scala/rx/lang/scala/examples/RxScalaDemo.scala b/examples/src/test/scala/rx/lang/scala/examples/RxScalaDemo.scala old mode 100755 new mode 100644 diff --git a/src/main/scala/rx/lang/scala/Observable.scala b/src/main/scala/rx/lang/scala/Observable.scala old mode 100755 new mode 100644 From fc264e216b98ca1bbc4758d6b2287468a977727a Mon Sep 17 00:00:00 2001 From: zsxwing Date: Fri, 5 Dec 2014 10:30:19 +0800 Subject: [PATCH 3/3] Update the links to the latest ones --- README.md | 2 +- TODO.md | 4 +- .../rx/lang/scala/examples/Olympics.scala | 4 +- src/main/scala/rx/lang/scala/Observable.scala | 408 +++++++++--------- src/main/scala/rx/lang/scala/Subject.scala | 2 +- .../observables/BlockingObservable.scala | 24 +- .../rx/lang/scala/subjects/AsyncSubject.scala | 2 +- .../lang/scala/subjects/BehaviorSubject.scala | 2 +- .../lang/scala/subjects/PublishSubject.scala | 2 +- .../lang/scala/subjects/ReplaySubject.scala | 2 +- 10 files changed, 226 insertions(+), 226 deletions(-) diff --git a/README.md b/README.md index 55f004c1..2f239f85 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ RxScala: - The API documentation can be found [here](http://reactivex.io/rxscala/scaladoc/index.html#rx.lang.scala.Observable). -Note that starting from version 0.15, `rx.lang.scala.Observable` is not a value class any more. [./Rationale.md](https://github.com/Netflix/RxJava/blob/master/language-adaptors/rxjava-scala/Rationale.md) explains why. +Note that starting from version 0.15, `rx.lang.scala.Observable` is not a value class any more. [./Rationale.md](https://github.com/ReactiveX/RxScala/blob/0.x/Rationale.md) explains why. You can build the API documentation yourself by running `sbt doc` in the RxScala root directory. Open `target/scala-2.11/api/index.html` to display it. diff --git a/TODO.md b/TODO.md index 94da7e36..0979ba32 100644 --- a/TODO.md +++ b/TODO.md @@ -5,7 +5,7 @@ This is a (probably incomplete) list of what still needs to be done in the Scala TODOs which came up at the meeting with Erik Meijer on 2013-10-11: -* Rename the factory methods in `object Observable`, considering that the most important is the one taking an `Observer => Subscription` function (the "king" according to Erik). Thunk to Subscription conversion (?), also consider Jason's [comments](https://github.com/Netflix/RxJava/commit/c1596253fc5567b7cc37d20128374d189471ff79). A useful trick might also be to have `apply(T, T, T*)` instead of just `apply(T*)`. +* Rename the factory methods in `object Observable`, considering that the most important is the one taking an `Observer => Subscription` function (the "king" according to Erik). Thunk to Subscription conversion (?), also consider Jason's [comments](https://github.com/ReactiveX/RxJava/commit/c1596253fc5567b7cc37d20128374d189471ff79). A useful trick might also be to have `apply(T, T, T*)` instead of just `apply(T*)`. * Factory methods for observables and instance methods should take implicit scheduler, default is different per method (Isn't this a contradiction? In other words: If I call a method without providing a scheduler, should the default scheduler be used or the implicit that I provided?) Find in .NET source the list of which schedulers goes with which operators by default. If no other default, use NewThreadScheduler. Note that there are methods in Scala Observable which should have an overload taking a Scheduler, but do not yet have it! Also remember Erik saying that he would like to "minimize magically injected concurrency". * Convert executor to scheduler * Check if TestScheduler added in 0.14.3 is sufficient @@ -14,7 +14,7 @@ TODOs which came up at the meeting with Erik Meijer on 2013-10-11: * Currently all Swing examples use Swing directly, without using the Scala wrappers around Swing. Make sure that everything is nice if the Scala wrappers around Swing are used, eg `Reaction { case clicked: ButtonClicked => … }` -- avoid default case, check out the hooks for partial function applyOrElse to avoid double pattern matching * There are no examples yet using `async`, but `async` will be used in the course. Write examples and check if everything works as expected when combined with `async`. * Futures: For the moment, just add a Future->Observable converter method to `object Observable`. Later, think if `Future[T] extends Observable[T]`. -* Operator `delay`: Once Erik has commented on [this](https://github.com/Netflix/RxJava/pull/384), make sure this operator is added accordingly to RxJava and then to RxScala +* Operator `delay`: Once Erik has commented on [this](https://github.com/ReactiveX/RxJava/pull/384), make sure this operator is added accordingly to RxJava and then to RxScala Some more TODOs: diff --git a/examples/src/test/scala/rx/lang/scala/examples/Olympics.scala b/examples/src/test/scala/rx/lang/scala/examples/Olympics.scala index c6f1b8bf..292fc041 100644 --- a/examples/src/test/scala/rx/lang/scala/examples/Olympics.scala +++ b/examples/src/test/scala/rx/lang/scala/examples/Olympics.scala @@ -92,8 +92,8 @@ object Olympics { /* def fourYearsEmptyOld: Observable[Medal] = { // TODO this should return an observable which emits nothing during fourYears and then completes - // Because of https://github.com/Netflix/RxJava/issues/388, we get non-terminating tests - // And this https://github.com/Netflix/RxJava/pull/289#issuecomment-24738668 also causes problems + // Because of https://github.com/ReactiveX/RxJava/issues/388, we get non-terminating tests + // And this https://github.com/ReactiveX/RxJava/pull/289#issuecomment-24738668 also causes problems // So we don't use this: Observable.interval(fourYears).take(1).map(i => neverUsedDummyMedal).filter(m => false) // But we just return empty, which completes immediately diff --git a/src/main/scala/rx/lang/scala/Observable.scala b/src/main/scala/rx/lang/scala/Observable.scala index 36912470..8663e177 100644 --- a/src/main/scala/rx/lang/scala/Observable.scala +++ b/src/main/scala/rx/lang/scala/Observable.scala @@ -232,7 +232,7 @@ trait Observable[+T] * Returns an Observable that first emits the items emitted by `this`, and then the items emitted * by `that`. * - * + * * * @param that * an Observable to be appended @@ -248,7 +248,7 @@ trait Observable[+T] /** * Returns an Observable that emits a specified item before it begins to emit items emitted by the source Observable. *

- * + * * * @param elem the item to emit * @return an Observable that emits the specified item before it begins to emit items emitted by the source Observable @@ -280,7 +280,7 @@ trait Observable[+T] * emitted by the source Observable, where that function returns an Observable, and then emitting the items * that result from concatinating those resulting Observables. * - * + * * * @param f a function that, when applied to an item emitted by the source Observable, returns an Observable * @return an Observable that emits the result of applying the transformation function to each item emitted @@ -298,7 +298,7 @@ trait Observable[+T] * Wraps this Observable in another Observable that ensures that the resulting * Observable is chronologically well-behaved. * - * + * * * A well-behaved Observable does not interleave its invocations of the [[rx.lang.scala.Observer.onNext onNext]], [[rx.lang.scala.Observer.onCompleted onCompleted]], and [[rx.lang.scala.Observer.onError onError]] methods of * its [[rx.lang.scala.Observer]]s; it invokes `onCompleted` or `onError` only once; and it never invokes `onNext` after invoking either `onCompleted` or `onError`. @@ -314,7 +314,7 @@ trait Observable[+T] /** * Wraps each item emitted by a source Observable in a timestamped tuple. * - * + * * * @return an Observable that emits timestamped items from the source Observable */ @@ -327,7 +327,7 @@ trait Observable[+T] * Wraps each item emitted by a source Observable in a timestamped tuple * with timestamps provided by the given Scheduler. *

- * + * * * @param scheduler [[rx.lang.scala.Scheduler]] to use as a time source. * @return an Observable that emits timestamped items from the source @@ -355,7 +355,7 @@ trait Observable[+T] * Returns an Observable formed from `this` Observable and `other` Iterable by combining * corresponding elements in pairs. *

- * + * *

* Note that the `other` Iterable is evaluated as items are observed from the source Observable; it is * not pre-consumed. This allows you to zip infinite streams on either side. @@ -371,7 +371,7 @@ trait Observable[+T] * Returns an Observable that emits items that are the result of applying a specified function to pairs of * values, one each from the source Observable and a specified Iterable sequence. *

- * + * *

* Note that the `other` Iterable is evaluated as items are observed from the source Observable; it is * not pre-consumed. This allows you to zip infinite streams on either side. @@ -603,7 +603,7 @@ trait Observable[+T] * Returns an Observable that emits non-overlapping buffered items from the source Observable each time the * specified boundary Observable emits an item. *

- * + * *

* Completion of either the source or the boundary Observable causes the returned Observable to emit the * latest buffer and complete. @@ -624,7 +624,7 @@ trait Observable[+T] * Returns an Observable that emits non-overlapping buffered items from the source Observable each time the * specified boundary Observable emits an item. *

- * + * *

* Completion of either the source or the boundary Observable causes the returned Observable to emit the * latest buffer and complete. @@ -644,7 +644,7 @@ trait Observable[+T] * non-overlapping windows. The boundary of each window is determined by the items emitted from a specified * boundary-governing Observable. * - * + * * * @param boundary an Observable whose emitted items close and open windows. Note: This is a by-name parameter, * so it is only evaluated when someone subscribes to the returned Observable. @@ -846,7 +846,7 @@ trait Observable[+T] * Observable completes or Observable completes or encounters an error, the resulting Observable emits the * current window and propagates the notification from the source Observable. * - * + * * * ===Backpressure Support:=== * This operator does not support backpressure as it uses time to control data flow. @@ -859,7 +859,7 @@ trait Observable[+T] * @param count the maximum size of each window before it should be emitted * @param scheduler the `Scheduler` to use when determining the end and start of a window * @return an Observable that emits new windows periodically as a fixed timespan elapses - * @see RxJava wiki: window + * @see RxJava wiki: window * @see MSDN: Observable.Window */ def sliding(timespan: Duration, timeshift: Duration, count: Int, scheduler: Scheduler): Observable[Observable[T]] = { @@ -873,7 +873,7 @@ trait Observable[+T] /** * Returns an Observable which only emits those items for which a given predicate holds. * - * + * * * @param predicate * a function that evaluates the items emitted by the source Observable, returning `true` if they pass the filter @@ -887,7 +887,7 @@ trait Observable[+T] /** * Registers an function to be called when this Observable invokes [[rx.lang.scala.Observer.onCompleted onCompleted]] or [[rx.lang.scala.Observer.onError onError]]. * - * + * * * @param action * an function to be invoked when the source Observable finishes @@ -902,7 +902,7 @@ trait Observable[+T] * the source Observable, where that function returns an Observable, and then merging those * resulting Observables and emitting the results of this merger. * - * + * * * @param f * a function that, when applied to an item emitted by the source Observable, returns @@ -921,7 +921,7 @@ trait Observable[+T] * Returns an Observable that applies a function to each item emitted or notification raised by the source * Observable and then flattens the Observables returned from these functions and emits the resulting items. * - * + * * * @tparam R the result type * @param onNext a function that returns an Observable to merge for each item emitted by the source Observable @@ -949,7 +949,7 @@ trait Observable[+T] * Returns an Observable that emits the results of a specified function to the pair of values emitted by the * source Observable and a specified collection Observable. * - * + * * * @tparam U the type of items emitted by the collection Observable * @tparam R the type of items emitted by the resulting Observable @@ -970,7 +970,7 @@ trait Observable[+T] * Returns an Observable that merges each item emitted by the source Observable with the values in an * Iterable corresponding to that item that is generated by a selector. * - * + * * * @tparam R the type of item emitted by the resulting Observable * @param collectionSelector a function that returns an Iterable sequence of values for when given an item emitted by the @@ -989,7 +989,7 @@ trait Observable[+T] * Returns an Observable that emits the results of applying a function to the pair of values from the source * Observable and an Iterable corresponding to that item that is generated by a selector. * - * + * * * @tparam U the collection element type * @tparam R the type of item emited by the resulting Observable @@ -1010,7 +1010,7 @@ trait Observable[+T] * Returns an Observable that applies the given function to each item emitted by an * Observable and emits the result. * - * + * * * @param func * a function to apply to each item emitted by the Observable @@ -1027,7 +1027,7 @@ trait Observable[+T] * Turns all of the notifications from a source Observable into [[rx.lang.scala.Observer.onNext onNext]] emissions, * and marks them with their original notification types within [[rx.lang.scala.Notification]] objects. * - * + * * * @return an Observable whose items are the result of materializing the items and * notifications of the source Observable @@ -1039,7 +1039,7 @@ trait Observable[+T] /** * Asynchronously subscribes and unsubscribes Observers on the specified [[rx.lang.scala.Scheduler]]. * - * + * * * @param scheduler * the [[rx.lang.scala.Scheduler]] to perform subscription and unsubscription actions on @@ -1064,7 +1064,7 @@ trait Observable[+T] /** * Asynchronously notify [[rx.lang.scala.Observer]]s on the specified [[rx.lang.scala.Scheduler]]. * - * + * * * @param scheduler * the [[rx.lang.scala.Scheduler]] to notify [[rx.lang.scala.Observer]]s on @@ -1083,7 +1083,7 @@ trait Observable[+T] * This operation is only available if `this` is of type `Observable[Notification[U]]` for some `U`, * otherwise you will get a compilation error. * - * + * * * @return an Observable that emits the items and notifications embedded in the [[rx.lang.scala.Notification]] objects emitted by the source Observable * @@ -1102,7 +1102,7 @@ trait Observable[+T] /** * Instruct an Observable to pass control to another Observable rather than invoking [[rx.lang.scala.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 [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1133,7 +1133,7 @@ trait Observable[+T] /** * Instruct an Observable to pass control to another Observable rather than invoking [[rx.lang.scala.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 [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1166,7 +1166,7 @@ trait Observable[+T] * * This differs from `Observable.onErrorResumeNext` in that this one does not handle `java.lang.Throwable` or `java.lang.Error` but lets those continue through. * - * + * * * By default, when an Observable encounters an error that prevents it from emitting the * expected item to its [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1198,7 +1198,7 @@ trait Observable[+T] * Instruct an Observable to emit an item (returned by a specified function) rather than * invoking [[rx.lang.scala.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 [[rx.lang.scala.Observer]], the Observable invokes its Observer's @@ -1230,7 +1230,7 @@ trait Observable[+T] * by the source Observable, and emits the final result from the final call to your function as * its sole item. * - * + * * * This technique, which is called "reduce" or "aggregate" here, is sometimes called "fold," * "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, @@ -1252,7 +1252,7 @@ trait Observable[+T] * Returns a [[rx.lang.scala.observables.ConnectableObservable]] that shares a single subscription to the underlying * Observable that will replay all of its items and notifications to any future [[rx.lang.scala.Observer]]. * - * + * * * @return a [[rx.lang.scala.observables.ConnectableObservable]] such that when the `connect` function * is called, the [[rx.lang.scala.observables.ConnectableObservable]] starts to emit items to its [[rx.lang.scala.Observer]]s @@ -1265,7 +1265,7 @@ trait Observable[+T] * Returns an Observable that emits items that are the results of invoking a specified selector on the items * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable. *

- * + * * * @param selector the selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1284,7 +1284,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying `bufferSize` notifications. *

- * + * * * @param selector the selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1305,7 +1305,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying no more than `bufferSize` items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1327,7 +1327,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying no more than `bufferSize` items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1351,7 +1351,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying a maximum of `bufferSize` items. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1373,7 +1373,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying all items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1393,7 +1393,7 @@ trait Observable[+T] * Returns an Observable that emits items that are the results of invoking a specified selector on items * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1413,7 +1413,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays at most `bufferSize` items that were emitted during a specified time window. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @param time the duration of the window in which the replayed items must have been emitted @@ -1428,7 +1428,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * that replays a maximum of `bufferSize` items that are emitted within a specified time window. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @param time the duration of the window in which the replayed items must have been emitted @@ -1446,7 +1446,7 @@ trait Observable[+T] * emitted by a `ConnectableObservable` that shares a single subscription to the source Observable, * replaying all items that were emitted within a specified time window. *

- * + * * * @param selector a selector function, which can use the multicasted sequence as many times as needed, without * causing multiple subscriptions to the Observable @@ -1466,7 +1466,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable that * replays at most `bufferSize` items emitted by that Observable. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @return a `ConnectableObservable` that shares a single subscription to the source Observable and @@ -1480,7 +1480,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays at most `bufferSize` items emitted by that Observable. *

- * + * * * @param bufferSize the buffer size that limits the number of items that can be replayed * @param scheduler the scheduler on which the Observers will observe the emitted items @@ -1495,7 +1495,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays all items emitted by that Observable within a specified time window. *

- * + * * * @param time the duration of the window in which the replayed items must have been emitted * @return a `ConnectableObservable` that shares a single subscription to the source Observable and @@ -1509,7 +1509,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable and * replays all items emitted by that Observable within a specified time window. *

- * + * * * @param time the duration of the window in which the replayed items must have been emitted * @param scheduler the Scheduler that is the time source for the window @@ -1524,7 +1524,7 @@ trait Observable[+T] * Returns a `ConnectableObservable` that shares a single subscription to the source Observable that * will replay all of its items and notifications to any future `Observer` on the given `Scheduler`. *

- * + * * * @param scheduler the Scheduler on which the Observers will observe the emitted items * @return a `ConnectableObservable` that shares a single subscription to the source Observable that @@ -1538,7 +1538,7 @@ trait Observable[+T] * This method has similar behavior to [[rx.lang.scala.Observable.replay]] except that this auto-subscribes to * the source Observable rather than returning a start function and an Observable. * - * + * * * This is useful when you want an Observable to cache responses and you can't control the * subscribe/unsubscribe behavior of all the [[rx.lang.scala.Observer]]s. @@ -1564,7 +1564,7 @@ trait Observable[+T] * Observable rather than returning a [[ConnectableObservable]] for which you must call * `connect` to activate the subscription. *

- * + * *

* This is useful when you want an Observable to cache responses and you can't control the * `subscribe/unsubscribe` behavior of all the [[Subscriber]]s. @@ -1586,7 +1586,7 @@ trait Observable[+T] * @param capacity hint for number of items to cache (for optimizing underlying data structure) * @return an Observable that, when first subscribed to, caches all of its items and notifications for the * benefit of subsequent subscribers - * @see RxJava wiki: cache + * @see RxJava wiki: cache * @since 0.20 */ def cache(capacity: Int): Observable[T] = { @@ -1600,7 +1600,7 @@ trait Observable[+T] * * This is an alias for `publish().refCount()` * - * + * * * @return a [[Observable]] that upon connection causes the source Observable to emit items to its [[Subscriber]]s * @since 0.19 @@ -1615,7 +1615,7 @@ trait Observable[+T] * * Note: this method uses `==` to compare elements. It's a bit different from RxJava which uses `Object.equals`. *

- * + * * *@param elem the item to search for in the emissions from the source Observable * @return an Observable that emits `true` if the specified item is emitted by the source Observable, @@ -1630,7 +1630,7 @@ trait Observable[+T] * before it begins emitting items from `this` [[rx.lang.scala.Observable]] to those [[rx.lang.scala.Observer]]s that * have subscribed to it. * - * + * * * @return an [[rx.lang.scala.observables.ConnectableObservable]]. */ @@ -1642,7 +1642,7 @@ trait Observable[+T] * Returns an Observable that emits the results of invoking a specified selector on items emitted by a `ConnectableObservable` * that shares a single subscription to the underlying sequence. *

- * + * * * @param selector a function that can use the multicasted source sequence as many times as needed, without * causing multiple subscriptions to the source sequence. Subscribers to the given source will @@ -1666,7 +1666,7 @@ trait Observable[+T] * source Observable, emitting the final result from the final call to your function as its sole * item. * - * + * * * This technique, which is called "reduce" or "aggregate" here, is sometimes called "fold," * "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, @@ -1690,7 +1690,7 @@ trait Observable[+T] * Returns an Observable that emits the results of sampling the items emitted by the source * Observable at a specified time interval. * - * + * * * @param duration the sampling rate * @return an Observable that emits the results of sampling the items emitted by the source @@ -1704,7 +1704,7 @@ trait Observable[+T] * Returns an Observable that emits the results of sampling the items emitted by the source * Observable at a specified time interval. * - * + * * * @param duration the sampling rate * @param scheduler @@ -1720,7 +1720,7 @@ trait Observable[+T] * Return an Observable that emits the results of sampling the items emitted by the source Observable * whenever the specified sampler Observable emits an item or completes. * - * + * * * @param sampler * the Observable to use for sampling the source Observable @@ -1737,7 +1737,7 @@ trait Observable[+T] * by an Observable into the same function, and so on until all items have been emitted by the * source Observable, emitting the result of each of these iterations. * - * + * * * This sort of function is sometimes called an accumulator. * @@ -1765,7 +1765,7 @@ trait Observable[+T] * same function, and so on until all items have been emitted by the source * Observable, emitting the result of each of these iterations. *

- * + * *

* * @param accumulator @@ -1786,7 +1786,7 @@ trait Observable[+T] * 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 @@ -1801,7 +1801,7 @@ trait Observable[+T] * Returns an Observable that skips the first `num` items emitted by the source * Observable and emits the remainder. * - * + * * * @param n * the number of items to skip @@ -1816,7 +1816,7 @@ trait Observable[+T] * Returns an Observable that drops values emitted by the source Observable before a specified time window * elapses. * - * + * * * @param time the length of the time window to drop * @return an Observable that drops values emitted by the source Observable before the time window defined @@ -1830,7 +1830,7 @@ trait Observable[+T] * Returns an Observable that drops values emitted by the source Observable before a specified time window * elapses. * - * + * * * @param time the length of the time window to drop * @param scheduler the `Scheduler` on which the timed wait happens @@ -1845,7 +1845,7 @@ trait Observable[+T] * Returns an Observable that bypasses all items from the source Observable as long as the specified * condition holds true. Emits all further source items as soon as the condition becomes false. * - * + * * * @param predicate * A function to test each item emitted from the source Observable for a condition. @@ -1860,7 +1860,7 @@ trait Observable[+T] * Returns an Observable that drops a specified number of items from the end of the sequence emitted by the * source Observable. *

- * + * *

* This Observer accumulates a queue long enough to store the first `n` items. As more items are * received, items are taken from the front of the queue and emitted by the returned Observable. This causes @@ -1879,7 +1879,7 @@ trait Observable[+T] * Returns an Observable that drops items emitted by the source Observable during a specified time window * before the source completes. *

- * + * * * Note: this action will cache the latest items arriving in the specified time window. * @@ -1895,7 +1895,7 @@ trait Observable[+T] * Returns an Observable that drops items emitted by the source Observable during a specified time window * (defined on a specified scheduler) before the source completes. *

- * + * * * Note: this action will cache the latest items arriving in the specified time window. * @@ -1911,13 +1911,13 @@ trait Observable[+T] /** * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. *

- * + * * * @param other the second Observable that has to emit an item before the source Observable's elements begin * to be mirrored by the resulting Observable * @return an Observable that skips items from the source Observable until the second Observable emits an * item, then emits the remaining items - * @see RxJava Wiki: skipUntil() + * @see RxJava Wiki: skipUntil() * @see MSDN: Observable.SkipUntil */ def dropUntil(other: Observable[Any]): Observable[T] = { @@ -1928,7 +1928,7 @@ trait Observable[+T] * Returns an Observable that emits only the first `num` items emitted by the source * Observable. * - * + * * * This method returns an Observable that will invoke a subscribing [[rx.lang.scala.Observer]]'s * [[rx.lang.scala.Observer.onNext onNext]] function a maximum of `num` times before invoking @@ -1947,7 +1947,7 @@ trait Observable[+T] /** * Returns an Observable that emits those items emitted by source Observable before a specified time runs out. *

- * + * * * @param time the length of the time window * @return an Observable that emits those items emitted by the source Observable before the time runs out @@ -1960,7 +1960,7 @@ trait Observable[+T] * Returns an Observable that emits those items emitted by source Observable before a specified time (on * specified Scheduler) runs out *

- * + * * * @param time the length of the time window * @param scheduler the Scheduler used for time source @@ -1975,7 +1975,7 @@ trait Observable[+T] * 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 @@ -1991,7 +1991,7 @@ trait Observable[+T] * 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 @@ -2007,7 +2007,7 @@ trait Observable[+T] * Return an Observable that emits the items from the source Observable that were emitted in a specified * window of `time` before the Observable completed. *

- * + * * * @param time the length of the time window * @return an Observable that emits the items from the source Observable that were emitted in the window of @@ -2022,7 +2022,7 @@ trait Observable[+T] * window of `time` before the Observable completed, where the timing information is provided by a specified * Scheduler. *

- * + * * * @param time the length of the time window * @param scheduler the Scheduler that provides the timestamps for the Observed items @@ -2038,7 +2038,7 @@ trait Observable[+T] * Return an Observable that emits at most a specified number of items from the source Observable that were * emitted in a specified window of time before the Observable completed. *

- * + * * * @param count the maximum number of items to emit * @param time the length of the time window @@ -2055,7 +2055,7 @@ trait Observable[+T] * emitted in a specified window of `time` before the Observable completed, where the timing information is * provided by a given Scheduler. *

- * + * * * @param count the maximum number of items to emit * @param time the length of the time window @@ -2073,7 +2073,7 @@ trait Observable[+T] * Returns an Observable that emits the items from the source Observable only until the * `other` Observable emits an item. * - * + * * * @param that * the Observable whose first emitted item will cause `takeUntil` to stop @@ -2089,7 +2089,7 @@ trait Observable[+T] * Returns an Observable that emits a single item, a list composed of all the items emitted by * the source Observable. * - * + * * * Normally, an Observable that returns multiple items will do so by invoking its [[rx.lang.scala.Observer]]'s * [[rx.lang.scala.Observer.onNext onNext]] method for each such item. You can change @@ -2128,7 +2128,7 @@ trait Observable[+T] * Groups the items emitted by an [[Observable]] according to a specified criterion, and emits these * grouped items as `(key, observable)` pairs. * - * + * * * Note: A `(key, observable)` will cache the items it is to emit until such time as it * is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore those @@ -2149,7 +2149,7 @@ trait Observable[+T] * @return an [[Observable]] that emits `(key, observable)` pairs, each of which corresponds to a * unique key value and each of which emits those items from the source Observable that share that * key value - * @see RxJava wiki: groupBy + * @see RxJava wiki: groupBy * @see MSDN: Observable.GroupBy */ def groupBy[K, V](keySelector: T => K, valueSelector: T => V): Observable[(K, Observable[V])] = { @@ -2162,7 +2162,7 @@ trait Observable[+T] /** * Correlates the items emitted by two Observables based on overlapping durations. *

- * + * * * @param other * the second Observable to join items from @@ -2178,7 +2178,7 @@ trait Observable[+T] * @return * an Observable that emits items correlating to items emitted by the source Observables * that have overlapping durations - * @see RxJava Wiki: join() + * @see RxJava Wiki: join() * @see MSDN: Observable.Join */ def join[S, R] (other: Observable[S])(leftDurationSelector: T => Observable[Any], rightDurationSelector: S => Observable[Any], resultSelector: (T, S) => R): Observable[R] = { @@ -2200,7 +2200,7 @@ trait Observable[+T] /** * Returns an Observable that correlates two Observables when they overlap in time and groups the results. * - * + * * * @param other the other Observable to correlate items from the source Observable with * @param leftDuration a function that returns an Observable whose emissions indicate the duration of the values of @@ -2232,7 +2232,7 @@ trait Observable[+T] * Observable that returns an Observable, and then emitting the items emitted by the most recently emitted * of these Observables. * - * + * * * @param f a function that, when applied to an item emitted by the source Observable, returns an Observable * @return an Observable that emits the items emitted by the Observable returned from applying a function to @@ -2248,7 +2248,7 @@ trait Observable[+T] * Given an Observable that emits Observables, creates a single Observable that * emits the items emitted by the most recently published of those Observables. * - * + * * * This operation is only available if `this` is of type `Observable[Observable[U]]` for some `U`, * otherwise you'll get a compilation error. @@ -2271,7 +2271,7 @@ trait Observable[+T] /** * Flattens two Observables into one Observable, without any transformation. * - * + * * * You can combine items emitted by two Observables so that they act like a single * Observable by using the `merge` method. @@ -2293,7 +2293,7 @@ trait Observable[+T] * refrain from propagating that error notification until all of the merged Observables have * finished emitting items. * - * + * * * Even if multiple merged Observables send `onError` notifications, `mergeDelayError` will only invoke the `onError` method of its * Observers once. @@ -2314,7 +2314,7 @@ trait Observable[+T] * Flattens the sequence of Observables emitted by `this` into one Observable, without any * transformation. * - * + * * * You can combine the items emitted by multiple Observables so that they act like a single * Observable by using this method. @@ -2341,7 +2341,7 @@ trait Observable[+T] * those Observables, without any transformation, while limiting the maximum number of concurrent * subscriptions to these Observables. * - * + * * * You can combine the items emitted by multiple Observables so that they appear as a single Observable, by * using the `flatten` method. @@ -2364,7 +2364,7 @@ trait Observable[+T] * refrain from propagating that error notification until all of the merged Observables have * finished emitting items. * - * + * * * Even if multiple merged Observables send `onError` notifications, this method will only invoke the `onError` method of its * Observers once. @@ -2421,7 +2421,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * $debounceVsThrottle * @@ -2439,7 +2439,7 @@ trait Observable[+T] * Return an Observable that mirrors the source Observable, except that it drops items emitted by the source * Observable that are followed by another item within a computed debounce duration. * - * + * * * @param debounceSelector function to retrieve a sequence that indicates the throttle duration for each item * @return an Observable that omits items emitted by the source Observable that are followed by another item @@ -2457,7 +2457,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * $debounceVsThrottle * @@ -2476,7 +2476,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * $debounceVsThrottle * @@ -2496,7 +2496,7 @@ trait Observable[+T] * * NOTE: If events keep firing faster than the timeout then no data will be emitted. * - * + * * * @param timeout * The time each value has to be 'the most recent' of the [[rx.lang.scala.Observable]] to ensure that it's not dropped. @@ -2514,7 +2514,7 @@ trait Observable[+T] * * This differs from `Observable.throttleLast` in that this only tracks passage of time whereas `Observable.throttleLast` ticks at scheduled intervals. * - * + * * * @param skipDuration * Time to wait before sending another value after emitting last value. @@ -2531,7 +2531,7 @@ trait Observable[+T] * * This differs from `Observable.throttleLast` in that this only tracks passage of time whereas `Observable.throttleLast` ticks at scheduled intervals. * - * + * * * @param skipDuration * Time to wait before sending another value after emitting last value. @@ -2546,7 +2546,7 @@ trait Observable[+T] * * This differs from `Observable.throttleFirst` in that this ticks along at a scheduled interval whereas `Observable.throttleFirst` does not tick, it just tracks passage of time. * - * + * * * @param intervalDuration * Duration of windows within with the last value will be chosen. @@ -2561,7 +2561,7 @@ trait Observable[+T] * * This differs from `Observable.throttleFirst` in that this ticks along at a scheduled interval whereas `Observable.throttleFirst` does not tick, it just tracks passage of time. * - * + * * * @param intervalDuration * Duration of windows within with the last value will be chosen. @@ -2577,7 +2577,7 @@ trait Observable[+T] * observed within the specified timeout duration starting from its * predecessor, observers are notified of a `TimeoutException`. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @return the source Observable modified to notify observers of a @@ -2594,7 +2594,7 @@ trait Observable[+T] * predecessor, a specified fallback Observable produces future items and * notifications from that point on. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @param other fallback Observable to use in case of a timeout @@ -2613,7 +2613,7 @@ trait Observable[+T] * observed within the specified timeout duration starting from its * predecessor, the observer is notified of a `TimeoutException`. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @param scheduler Scheduler to run the timeout timers on @@ -2631,7 +2631,7 @@ trait Observable[+T] * predecessor, a specified fallback Observable sequence produces future * items and notifications from that point on. *

- * + * * * @param timeout maximum duration between items before a timeout occurs * @param other Observable to use as the fallback in case of a timeout @@ -2651,7 +2651,7 @@ trait Observable[+T] * previous item, where that period of time is measured by an Observable that is a function * of the previous item. *

- * + * *

* Note: The arrival of the first source item is never timed out. * @@ -2672,7 +2672,7 @@ trait Observable[+T] * after the emission of the previous item, where that period of time is measured by an * Observable that is a function of the previous item. *

- * + * *

* Note: The arrival of the first source item is never timed out. * @@ -2697,7 +2697,7 @@ trait Observable[+T] * if either the first item emitted by the source Observable or any subsequent item * don't arrive within time windows defined by other Observables. *

- * + * *

* @param firstTimeoutSelector * a function that returns an Observable that determines the timeout window for the @@ -2720,7 +2720,7 @@ trait Observable[+T] * Observable if either the first item emitted by the source Observable or any subsequent item * don't arrive within time windows defined by other Observables. *

- * + * *

* @param firstTimeoutSelector * a function that returns an Observable which determines the timeout window for the @@ -2778,7 +2778,7 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or * a default value if the source Observable is empty. * - * + * * * @param default * The default value to emit if the source Observable doesn't emit anything. @@ -2794,7 +2794,7 @@ trait Observable[+T] * Returns an Observable that emits only an `Option` with the very first item emitted by the source Observable, * or `None` if the source Observable is empty. * - * + * * * @return an Observable that emits only an `Option` with the very first item from the source, or `None` * if the source Observable completes without emitting any item. @@ -2807,7 +2807,7 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or * a default value if the source Observable is empty. * - * + * * * @param default * The default value to emit if the source Observable doesn't emit anything. @@ -2821,11 +2821,11 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty. *

- * + * * * @return an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty - * @see RxJava Wiki: first() + * @see RxJava Wiki: first() * @see "MSDN: Observable.firstAsync()" */ def first: Observable[T] = { @@ -2836,11 +2836,11 @@ trait Observable[+T] * Returns an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty. *

- * + * * * @return an Observable that emits only the very first item emitted by the source Observable, or raises an * `NoSuchElementException` if the source Observable is empty - * @see RxJava Wiki: first() + * @see RxJava Wiki: first() * @see "MSDN: Observable.firstAsync()" * @see [[Observable.first]] */ @@ -2887,11 +2887,11 @@ trait Observable[+T] * Returns an Observable that emits the last item emitted by the source Observable or notifies observers of * an `NoSuchElementException` if the source Observable is empty. * - * + * * * @return an Observable that emits the last item from the source Observable or notifies observers of an * error - * @see RxJava Wiki: last() + * @see RxJava Wiki: last() * @see "MSDN: Observable.lastAsync()" */ def last: Observable[T] = { @@ -2902,7 +2902,7 @@ trait Observable[+T] * Returns an Observable that emits only an `Option` with the last item emitted by the source Observable, * or `None` if the source Observable completes without emitting any items. * - * + * * * @return an Observable that emits only an `Option` with the last item emitted by the source Observable, * or `None` if the source Observable is empty @@ -2915,7 +2915,7 @@ trait Observable[+T] * Returns an Observable that emits only the last item emitted by the source Observable, or a default item * if the source Observable completes without emitting any items. * - * + * * * @param default the default item to emit if the source Observable is empty. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -2931,12 +2931,12 @@ trait Observable[+T] * item. If the source Observable emits more than one item or no items, notify of an `IllegalArgumentException` * or `NoSuchElementException` respectively. * - * + * * * @return an Observable that emits the single item emitted by the source Observable * @throws IllegalArgumentException if the source emits more than one item * @throws NoSuchElementException if the source emits no items - * @see RxJava Wiki: single() + * @see RxJava Wiki: single() * @see "MSDN: Observable.singleAsync()" */ def single: Observable[T] = { @@ -2948,7 +2948,7 @@ trait Observable[+T] * with that item; if the source Observable is empty, return an Observable that emits `None`. * If the source Observable emits more than one item, throw an `IllegalArgumentException`. * - * + * * * @return an Observable that emits an `Option` with the single item emitted by the source Observable, or * `None` if the source Observable is empty @@ -2964,7 +2964,7 @@ trait Observable[+T] * item; if the source Observable is empty, return an Observable that emits a default item. If the source * Observable emits more than one item, throw an `IllegalArgumentException`. * - * + * * * @param default a default value to emit if the source Observable emits no item. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -2983,7 +2983,7 @@ trait Observable[+T] * Returns an Observable that emits the items emitted by the source Observable or a specified default item * if the source Observable is empty. * - * + * * * @param default the item to emit if the source Observable emits no items. This is a by-name parameter, so it is * only evaluated if the source Observable doesn't emit anything. @@ -3002,7 +3002,7 @@ trait Observable[+T] /** * Returns an Observable that forwards all sequentially distinct items emitted from the source Observable. * - * + * * * @return an Observable of sequentially distinct items */ @@ -3014,7 +3014,7 @@ trait Observable[+T] * Returns an Observable that forwards all items emitted from the source Observable that are sequentially * distinct according to a key selector function. * - * + * * * @param keySelector * a function that projects an emitted item to a key value which is used for deciding whether an item is sequentially @@ -3028,7 +3028,7 @@ trait Observable[+T] /** * Returns an Observable that forwards all distinct items emitted from the source Observable. * - * + * * * @return an Observable of distinct items */ @@ -3040,7 +3040,7 @@ trait Observable[+T] * Returns an Observable that forwards all items emitted from the source Observable that are distinct according * to a key selector function. * - * + * * * @param keySelector * a function that projects an emitted item to a key value which is used for deciding whether an item is @@ -3054,7 +3054,7 @@ trait Observable[+T] /** * Returns an Observable that counts the total number of elements in the source Observable. * - * + * * * @return an Observable emitting the number of counted elements of the source Observable * as its single item. @@ -3066,7 +3066,7 @@ trait Observable[+T] /** * Returns an Observable that counts the total number of elements in the source Observable. * - * + * * * @return an Observable emitting the number of counted elements of the source Observable * as its single item. @@ -3076,7 +3076,7 @@ trait Observable[+T] /** * Retry subscription to origin Observable upto given retry count. * - * + * * * If [[rx.lang.scala.Observer.onError]] is invoked the source Observable will be re-subscribed to as many times as defined by retryCount. * @@ -3096,7 +3096,7 @@ trait Observable[+T] /** * Retry subscription to origin Observable whenever onError is called (infinite retry count). * - * + * * * If [[rx.lang.scala.Observer.onError]] is invoked the source Observable will be re-subscribed to. * @@ -3114,7 +3114,7 @@ trait Observable[+T] * Returns an Observable that mirrors the source Observable, resubscribing to it if it calls `onError` * and the predicate returns true for that specific exception and retry count. * - * + * * * @param predicate the predicate that determines if a resubscription may happen in case of a specific exception and retry count * @return the source Observable modified with retry logic @@ -3134,7 +3134,7 @@ trait Observable[+T] * `onCompleted` or `onError` on the child subscription. Otherwise, this Observable will * resubscribe to the source Observable. *

- * + * * * Example: * @@ -3176,7 +3176,7 @@ trait Observable[+T] * @param notificationHandler receives an Observable of a Throwable with which a user can complete or error, aborting the * retry * @return the source Observable modified with retry logic - * @see RxJava Wiki: retryWhen() + * @see RxJava Wiki: retryWhen() * @see RxScalaDemo.retryWhenDifferentExceptionsExample for a more intricate example * @since 0.20 */ @@ -3196,7 +3196,7 @@ trait Observable[+T] * func. If the Observable returned `onCompletes` or `onErrors` then retry will call `onCompleted` * or `onError` on the child subscription. Otherwise, this observable will resubscribe to the source observable, on a particular Scheduler. *

- * + * *

*

*
Scheduler:
@@ -3207,7 +3207,7 @@ trait Observable[+T] * the retry * @param scheduler the Scheduler on which to subscribe to the source Observable * @return the source Observable modified with retry logic - * @see RxJava Wiki: retryWhen() + * @see RxJava Wiki: retryWhen() * @see RxScalaDemo.retryWhenDifferentExceptionsExample for a more intricate example * @since 0.20 */ @@ -3224,10 +3224,10 @@ trait Observable[+T] /** * Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely. *

- * + * * * @return an Observable that emits the items emitted by the source Observable repeatedly and in sequence - * @see RxJava Wiki: repeat() + * @see RxJava Wiki: repeat() * @see MSDN: Observable.Repeat */ def repeat: Observable[T] = { @@ -3238,11 +3238,11 @@ trait Observable[+T] * Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely, * on a particular Scheduler. *

- * + * * * @param scheduler the Scheduler to emit the items on * @return an Observable that emits the items emitted by the source Observable repeatedly and in sequence - * @see RxJava Wiki: repeat() + * @see RxJava Wiki: repeat() * @see MSDN: Observable.Repeat */ def repeat(scheduler: Scheduler): Observable[T] = { @@ -3252,13 +3252,13 @@ trait Observable[+T] /** * Returns an Observable that repeats the sequence of items emitted by the source Observable at most `count` times. *

- * + * * * @param count the number of times the source Observable items are repeated, * a count of 0 will yield an empty sequence * @return an Observable that repeats the sequence of items emitted by the source Observable at most `count` times * @throws IllegalArgumentException if `count` is less than zero - * @see RxJava Wiki: repeat() + * @see RxJava Wiki: repeat() * @see MSDN: Observable.Repeat */ def repeat(count: Long): Observable[T] = { @@ -3269,14 +3269,14 @@ trait Observable[+T] * Returns an Observable that repeats the sequence of items emitted by the source Observable * at most `count` times, on a particular Scheduler. *

- * + * * * @param count the number of times the source Observable items are repeated, * a count of 0 will yield an empty sequence * @param scheduler the `Scheduler` to emit the items on * @return an Observable that repeats the sequence of items emitted by the source Observable at most `count` times * on a particular Scheduler - * @see RxJava Wiki: repeat() + * @see RxJava Wiki: repeat() * @see MSDN: Observable.Repeat */ def repeat(count: Long, scheduler: Scheduler): Observable[T] = { @@ -3291,7 +3291,7 @@ trait Observable[+T] * call `onCompleted` or `onError` on the child subscription. Otherwise, this Observable will * resubscribe to the source Observable, on a particular Scheduler. *

- * + * *

*
Scheduler:
*
you specify which [[Scheduler]] this operator will use
@@ -3300,7 +3300,7 @@ trait Observable[+T] * @param notificationHandler receives an Observable of a Unit with which a user can complete or error, aborting the repeat. * @param scheduler the Scheduler to emit the items on * @return the source Observable modified with repeat logic - * @see RxJava Wiki: repeatWhen() + * @see RxJava Wiki: repeatWhen() * @see MSDN: Observable.Repeat * @since 0.20 */ @@ -3322,7 +3322,7 @@ trait Observable[+T] * call `onCompleted` or `onError` on the child subscription. Otherwise, this Observable will * resubscribe to the source observable. *

- * + * * * @example * @@ -3359,7 +3359,7 @@ trait Observable[+T] * * @param notificationHandler receives an Observable of a Unit with which a user can complete or error, aborting the repeat. * @return the source Observable modified with repeat logic - * @see RxJava Wiki: repeatWhen() + * @see RxJava Wiki: repeatWhen() * @see MSDN: Observable.Repeat * @since 0.20 */ @@ -3378,7 +3378,7 @@ trait Observable[+T] * operators). * * @return a [[BlockingObservable]] version of this Observable - * @see Blocking Observable Operators + * @see Blocking Observable Operators * @since 0.19 */ def toBlocking: BlockingObservable[T] = { @@ -3497,7 +3497,7 @@ trait Observable[+T] * source `Observable` is reference counted, in which case the source `Observable` will invoke * the given action for the first subscription. *

- * + * *

*
Scheduler:
*
`onSubscribe` does not operate by default on a particular `Scheduler`.
@@ -3506,7 +3506,7 @@ trait Observable[+T] * @param onSubscribe * the action that gets called when an observer subscribes to this `Observable` * @return the source `Observable` modified so as to call this Action when appropriate - * @see RxJava wiki: doOnSubscribe + * @see RxJava wiki: doOnSubscribe * @since 0.20 */ def doOnSubscribe(onSubscribe: => Unit): Observable[T] = { @@ -3516,13 +3516,13 @@ trait Observable[+T] /** * Modifies an Observable so that it invokes an action when it calls `onCompleted` or `onError`. *

- * + * *

* This differs from `finallyDo` in that this happens **before** `onCompleted/onError` are emitted. * * @param onTerminate the action to invoke when the source Observable calls `onCompleted` or `onError` * @return the source Observable with the side-effecting behavior applied - * @see RxJava Wiki: doOnTerminate() + * @see RxJava Wiki: doOnTerminate() * @see MSDN: Observable.Do */ def doOnTerminate(onTerminate: => Unit): Observable[T] = { @@ -3535,7 +3535,7 @@ trait Observable[+T] * source `Observable` is reference counted, in which case the source `Observable` will invoke * the given action for the very last un-subscription. *

- * + * *

*
Scheduler:
*
`doOnUnsubscribe` does not operate by default on a particular `Scheduler`.
@@ -3544,7 +3544,7 @@ trait Observable[+T] * @param onUnsubscribe * the action that gets called when this `Observable` is unsubscribed * @return the source `Observable` modified so as to call this Action when appropriate - * @see RxJava wiki: doOnUnsubscribe + * @see RxJava wiki: doOnUnsubscribe * @since 0.20 */ def doOnUnsubscribe(onUnsubscribe: => Unit): Observable[T] = { @@ -3554,7 +3554,7 @@ trait Observable[+T] /** * Given two Observables, mirror the one that first emits an item. * - * + * * * @param that * an Observable competing to react first @@ -3570,7 +3570,7 @@ trait Observable[+T] * Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a * specified delay. Error notifications from the source Observable are not delayed. * - * + * * * @param delay the delay to shift the source by * @return the source Observable shifted in time by the specified delay @@ -3583,7 +3583,7 @@ trait Observable[+T] * Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a * specified delay. Error notifications from the source Observable are not delayed. * - * + * * * @param delay the delay to shift the source by * @param scheduler the Scheduler to use for delaying @@ -3597,7 +3597,7 @@ trait Observable[+T] * Returns an Observable that delays the emissions of the source Observable via another Observable on a * per-item basis. *

- * + * *

* Note: the resulting Observable will immediately propagate any `onError` notification * from the source Observable. @@ -3619,7 +3619,7 @@ trait Observable[+T] * Returns an Observable that delays the subscription to and emissions from the souce Observable via another * Observable on a per-item basis. *

- * + * *

* Note: the resulting Observable will immediately propagate any `onError` notification * from the source Observable. @@ -3647,7 +3647,7 @@ trait Observable[+T] /** * Return an Observable that delays the subscription to the source Observable by a given amount of time. * - * + * * * @param delay the time to delay the subscription * @return an Observable that delays the subscription to the source Observable by the given amount @@ -3660,7 +3660,7 @@ trait Observable[+T] * Return an Observable that delays the subscription to the source Observable by a given amount of time, * both waiting and subscribing on a given Scheduler. * - * + * * * @param delay the time to delay the subscription * @param scheduler the Scheduler on which the waiting and subscription will happen @@ -3675,7 +3675,7 @@ trait Observable[+T] * Returns an Observable that delays the subscription to the source Observable until a second Observable * emits an item. *

- * + * *

*
Scheduler:
*
This version of `delay` operates by default on the `computation` `Scheduler`.
@@ -3701,7 +3701,7 @@ trait Observable[+T] * Returns an Observable that emits the single item at a specified index in a sequence of emissions from a * source Observbable. * - * + * * * @param index * the zero-based index of the item to retrieve @@ -3719,7 +3719,7 @@ trait Observable[+T] * Returns an Observable that emits the item found at a specified index in a sequence of emissions from a * source Observable, or a default item if that index is out of range. * - * + * * * @param index * the zero-based index of the item to retrieve @@ -3739,7 +3739,7 @@ trait Observable[+T] * Return an Observable that emits a single `Map` containing values corresponding to items emitted by the * source Observable, mapped by the keys returned by a specified `keySelector` function. *

- * + * *

* * @param keySelector the function that extracts the key from a source item to be used in the `Map` @@ -3792,7 +3792,7 @@ trait Observable[+T] * Return an Observable that emits a single `Map` containing all items emitted by the source Observable, * mapped by the keys returned by a specified `keySelector` function. *

- * + * *

* If more than one source item maps to the same key, the `Map` will contain the latest of those items. * @@ -3808,7 +3808,7 @@ trait Observable[+T] * Return an Observable that emits a single `Map` containing values corresponding to items emitted by the * source Observable, mapped by the keys returned by a specified `keySelector` function. *

- * + * *

* If more than one source item maps to the same key, the `Map` will contain a single entry that * corresponds to the latest of those items. @@ -3826,7 +3826,7 @@ trait Observable[+T] * Returns an Observable that emits a Boolean value that indicates whether `this` and `that` Observable sequences are the * same by comparing the items emitted by each Observable pairwise. *

- * + * * * Note: this method uses `==` to compare elements. It's a bit different from RxJava which uses `Object.equals`. * @@ -3841,7 +3841,7 @@ trait Observable[+T] * Returns an Observable that emits a Boolean value that indicates whether `this` and `that` Observable sequences are the * same by comparing the items emitted by each Observable pairwise based on the results of a specified `equality` function. *

- * + * * * @param that the Observable to compare * @param equality a function used to compare items emitted by each Observable @@ -3858,7 +3858,7 @@ trait Observable[+T] * Returns an Observable that emits records of the time interval between consecutive items emitted by the * source Obsegrvable. *

- * + * * * @return an Observable that emits time interval information items */ @@ -3871,7 +3871,7 @@ trait Observable[+T] * Returns an Observable that emits records of the time interval between consecutive items emitted by the * source Observable, where this interval is computed on a specified Scheduler. *

- * + * * * @param scheduler the [[Scheduler]] used to compute time intervals * @return an Observable that emits time interval information items @@ -3901,7 +3901,7 @@ trait Observable[+T] * @param operator the Operator that implements the Observable-operating function to be applied to the source * Observable * @return an Observable that is the result of applying the lifted Operator to the source Observable - * @see RxJava wiki: Implementing Your Own Operators + * @see RxJava wiki: Implementing Your Own Operators * @since 0.17 */ def lift[R](operator: Subscriber[R] => Subscriber[T]): Observable[R] = { @@ -3911,7 +3911,7 @@ trait Observable[+T] /** * Converts the source `Observable[T]` into an `Observable[Observable[T]]` that emits the source Observable as its single emission. * - * + * * * @return an Observable that emits a single item: the source Observable */ @@ -3965,7 +3965,7 @@ trait Observable[+T] * Returns an Observable that counts the total number of items emitted by the source Observable and emits * this count as a 64-bit Long. *

- * + * *

*
Backpressure Support:
*
This operator does not support backpressure because by intent it will receive all values and reduce @@ -3989,7 +3989,7 @@ trait Observable[+T] * source Observable keyed by a specified `keySelector` function. The items having the same * key will be put into a `Set`. * - * + * * * @param keySelector the function that extracts the key from the source items to be used as key in the `mutable.MultiMap` * @return an Observable that emits a single item: a `mutable.MultiMap` that contains items emitted by the @@ -4004,7 +4004,7 @@ trait Observable[+T] * specified `valueSelector` function from items emitted by the source Observable, keyed by a * specified `keySelector` function. The values having the same key will be put into a `Set`. * - * + * * * @param keySelector the function that extracts a key from the source items to be used as key in the `mutable.MultiMap` * @param valueSelector the function that extracts a value from the source items to be used as value in the `mutable.MultiMap` @@ -4020,7 +4020,7 @@ trait Observable[+T] * contains values extracted by a specified `valueSelector` function from items emitted by the source Observable, and * keyed by the `keySelector` function. The values having the same key will be put into a `Set`. * - * + * * * @param keySelector the function that extracts a key from the source items to be used as the key in the `mutable.MultiMap` * @param valueSelector the function that extracts a value from the source items to be used as the value in the `mutable.MultiMap` @@ -4246,13 +4246,13 @@ trait Observable[+T] * Instructs an Observable that is emitting items faster than its observer can consume them to buffer these * items indefinitely until they can be emitted. * - * + * * * ===Scheduler:=== * `onBackpressureBuffer` does not operate by default on a particular `Scheduler`. * * @return the source Observable modified to buffer items to the extent system resources allow - * @see RxJava wiki: Backpressure + * @see RxJava wiki: Backpressure */ def onBackpressureBuffer: Observable[T] = { toScalaObservable[T](asJavaObservable.onBackpressureBuffer) @@ -4262,7 +4262,7 @@ trait Observable[+T] * Use this operator when the upstream does not natively support backpressure and you wish to drop * `onNext` when unable to handle further events. * - * + * * * If the downstream request count hits 0 then `onNext` will be dropped until `request(long n)` * is invoked again to increase the request count. @@ -4271,7 +4271,7 @@ trait Observable[+T] * onBackpressureDrop` does not operate by default on a particular `Scheduler`. * * @return the source Observable modified to drop `onNext` notifications on overflow - * @see RxJava wiki: Backpressure + * @see RxJava wiki: Backpressure */ def onBackpressureDrop: Observable[T] = { toScalaObservable[T](asJavaObservable.onBackpressureDrop) @@ -4319,7 +4319,7 @@ object Observable { /** * Creates an Observable that will execute the given function when an [[rx.lang.scala.Observer]] subscribes to it. * - * + * * * Write the function you pass to `create` so that it behaves as an Observable: It * should invoke the Observer's [[rx.lang.scala.Observer.onNext onNext]], [[rx.lang.scala.Observer.onError onError]], and [[rx.lang.scala.Observer.onCompleted onCompleted]] methods @@ -4364,7 +4364,7 @@ object Observable { /** * Returns an Observable that will execute the specified function when someone subscribes to it. * - * + * * * Write the function you pass so that it behaves as an Observable: It should invoke the * Subscriber's `onNext`, `onError`, and `onCompleted` methods appropriately. @@ -4378,8 +4378,8 @@ object Observable { * See Rx Design Guidelines (PDF) for detailed * information. * - * See `RxScalaDemo.createExampleGood` - * and `RxScalaDemo.createExampleGood2`. + * See `RxScalaDemo.createExampleGood` + * and `RxScalaDemo.createExampleGood2`. * * @tparam T * the type of the items that this Observable emits @@ -4397,7 +4397,7 @@ object Observable { * Returns an Observable that invokes an [[rx.lang.scala.Observer]]'s [[rx.lang.scala.Observer.onError onError]] * method when the Observer subscribes to it. * - * + * * * @param exception * the particular error to report @@ -4415,13 +4415,13 @@ object Observable { * immediately invokes its [[rx.lang.scala.Observer#onCompleted onCompleted]] method * with the specified scheduler. *

- * + * * * @return an Observable that returns no data to the [[rx.lang.scala.Observer]] and * immediately invokes the [[rx.lang.scala.Observer]]r's * [[rx.lang.scala.Observer#onCompleted onCompleted]] method with the * specified scheduler - * @see RxJava Wiki: empty() + * @see RxJava Wiki: empty() * @see MSDN: Observable.Empty Method (IScheduler) */ def empty: Observable[Nothing] = { @@ -4431,7 +4431,7 @@ object Observable { /** * Converts a sequence of values into an Observable. * - * + * * * Implementation note: the entire array will be immediately emitted each time an [[rx.lang.scala.Observer]] subscribes. * Since this occurs before the [[rx.lang.scala.Subscription]] is returned, @@ -4469,7 +4469,7 @@ object Observable { /** * Converts an `Iterable` into an Observable. * - * + * * * Note: the entire iterable sequence is immediately emitted each time an * Observer subscribes. Since this occurs before the @@ -4491,7 +4491,7 @@ object Observable { * new Observer that subscribes. That is, for each subscriber, the actual 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. This allows an [[rx.lang.scala.Observer]] to easily @@ -4512,7 +4512,7 @@ object Observable { /** * Returns an Observable that never sends any items or notifications to an [[rx.lang.scala.Observer]]. * - * + * * * This Observable is useful primarily for testing purposes. * @@ -4570,7 +4570,7 @@ object Observable { /** * Emits `0`, `1`, `2`, `...` with a delay of `duration` between consecutive numbers. * - * + * * * @param duration * duration between two consecutive numbers @@ -4583,7 +4583,7 @@ object Observable { /** * Emits `0`, `1`, `2`, `...` with a delay of `duration` between consecutive numbers. * - * + * * * @param period * duration between two consecutive numbers @@ -4599,7 +4599,7 @@ object Observable { * Return an Observable that emits a 0L after the `initialDelay` and ever increasing * numbers after each `period` of time thereafter, on a specified Scheduler. *

- * + * * * @param initialDelay * the initial delay time to wait before emitting the first value of 0L @@ -4616,7 +4616,7 @@ object Observable { * Return an Observable that emits a 0L after the `initialDelay` and ever increasing * numbers after each `period` of time thereafter, on a specified Scheduler. *

- * + * * * @param initialDelay * the initial delay time to wait before emitting the first value of 0L @@ -4634,7 +4634,7 @@ object Observable { /** * Returns an Observable that emits `0L` after a specified delay, and then completes. * - * + * * * @param delay the initial delay before emitting a single `0L` * @return Observable that emits `0L` after a specified delay, and then completes @@ -4647,7 +4647,7 @@ object Observable { * Returns an Observable that emits `0L` after a specified delay, on a specified Scheduler, and then * completes. * - * + * * * @param delay the initial delay before emitting a single `0L` * @param scheduler the Scheduler to use for scheduling the item @@ -4660,7 +4660,7 @@ object Observable { /** * Constructs an Observable that creates a dependent resource object. * - * + * * * ===Scheduler:=== * `using` does not operate by default on a particular `Scheduler`. @@ -4670,7 +4670,7 @@ object Observable { * @param observableFactory the factory function to create an Observable * @param dispose the function that will dispose of the resource * @return the Observable whose lifetime controls the lifetime of the dependent resource object - * @see RxJava wiki: using + * @see RxJava wiki: using * @see MSDN: Observable.Using */ def using[T, Resource](resourceFactory: => Resource)(observableFactory: Resource => Observable[T], dispose: Resource => Unit): Observable[T] = { @@ -4686,7 +4686,7 @@ object Observable { /** * Mirror the one Observable in an Iterable of several Observables that first emits an item. * - * + * * * @param sources an Iterable of Observable sources competing to react first * @return an Observable that emits the same sequence of items as whichever of the source Observables diff --git a/src/main/scala/rx/lang/scala/Subject.scala b/src/main/scala/rx/lang/scala/Subject.scala index 3a96a140..0b3dad49 100644 --- a/src/main/scala/rx/lang/scala/Subject.scala +++ b/src/main/scala/rx/lang/scala/Subject.scala @@ -39,7 +39,7 @@ trait Subject[T] extends Observable[T] with Observer[T] { * Subject that, once an `Observer` has subscribed, emits all subsequently observed items to the * subscriber. *

- * + * *

* @example {{{ diff --git a/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala b/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala index 259150c5..9c672412 100644 --- a/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala +++ b/src/main/scala/rx/lang/scala/observables/BlockingObservable.scala @@ -42,7 +42,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * This is similar to {@link Observable#subscribe(Observer)}, but it blocks. Because it blocks it does * not need the {@link Observer#onCompleted()} or {@link Observer#onError(Throwable)} methods. * - * + * * * @param f * the {@link Action1} to invoke for every item emitted by the {@link Observable} @@ -61,12 +61,12 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * Returns the last item emitted by a specified [[Observable]], or * throws `NoSuchElementException` if it emits no items. * - * + * * * @return the last item emitted by the source [[Observable]] * @throws NoSuchElementException * if source contains no elements - * @see RxJava Wiki: last() + * @see RxJava Wiki: last() * @see MSDN: Observable.Last */ def last : T = { @@ -88,7 +88,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * Returns the last item emitted by the source Observable, or a default item * if the source Observable completes without emitting any items. * - * + * * * @param default the default item to emit if the source Observable is empty. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -105,7 +105,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * @return the first item emitted by the source [[Observable]] * @throws NoSuchElementException * if source contains no elements - * @see RxJava Wiki: first() + * @see RxJava Wiki: first() * @see MSDN: Observable.First */ def first : T = { @@ -119,7 +119,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * @return the first item emitted by the source [[Observable]] * @throws NoSuchElementException * if source contains no elements - * @see RxJava Wiki: first() + * @see RxJava Wiki: first() * @see MSDN: Observable.First * @see [[BlockingObservable.first]] */ @@ -139,7 +139,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) /** * Returns the very first item emitted by the source Observable, or a default value if the source Observable is empty. * - * + * * * @param default The default value to emit if the source Observable doesn't emit anything. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -152,7 +152,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) /** * Returns an {@link Iterable} that always returns the item most recently emitted by an {@link Observable}. *

- * + * * * @param initialValue * the initial value that will be yielded by the {@link Iterable} sequence if the {@link Observable} has not yet emitted an item @@ -167,7 +167,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * Returns an {@link Iterable} that blocks until the {@link Observable} emits another item, * then returns that item. *

- * + * * * @return an {@link Iterable} that blocks upon each iteration until the {@link Observable} emits a new item, whereupon the Iterable returns that item */ @@ -179,7 +179,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * If the source Observable completes after emitting a single item, return that item. If the source Observable * emits more than one item or no items, notify of an `IllegalArgumentException` or `NoSuchElementException` respectively. * - * + * * * @return an Observable that emits the single item emitted by the source Observable * @throws IllegalArgumentException if the source emits more than one item @@ -207,7 +207,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * if the source Observable is empty, return a default item. If the source Observable * emits more than one item, throw an `IllegalArgumentException`. * - * + * * * @param default a default value to emit if the source Observable emits no item. * This is a by-name parameter, so it is only evaluated if the source Observable doesn't emit anything. @@ -256,7 +256,7 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T]) * is empty. Use `Observable.toSeq.toBlocking.toFuture` if you are not sure about the size of `BlockingObservable` * and do not want to handle these `Exception`s. * - * + * * * @return a `Future` that expects a single item to be emitted by this `BlockingObservable`. */ diff --git a/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala b/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala index 1cd18cc2..b4c13b74 100644 --- a/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/AsyncSubject.scala @@ -21,7 +21,7 @@ import rx.lang.scala.Subject * Subject that publishes only the last item observed to each `Observer` that has subscribed, when the * source `Observable}` completes. *

- * + * *

* @example {{{ diff --git a/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala b/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala index 9989757c..efd06791 100644 --- a/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/BehaviorSubject.scala @@ -21,7 +21,7 @@ import rx.lang.scala.Subject * Subject that emits the most recent item it has observed and all subsequent observed items to each subscribed * `Observer`. *

- * + * *

* @example {{{ diff --git a/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala b/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala index 28115bbd..37b8337e 100644 --- a/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/PublishSubject.scala @@ -21,7 +21,7 @@ import rx.lang.scala.Subject * Subject that, once an `Observer` has subscribed, emits all subsequently observed items to the * subscriber. *

- * + * *

* @example {{{ diff --git a/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala b/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala index d5012310..e1b65db6 100644 --- a/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala +++ b/src/main/scala/rx/lang/scala/subjects/ReplaySubject.scala @@ -22,7 +22,7 @@ import scala.concurrent.duration.Duration /** * Subject that buffers all items it observes and replays them to any `Observer` that subscribes. *

- * + * *

* @example {{{