@@ -3178,10 +3178,10 @@ trait Observable[+T]
3178
3178
3179
3179
/**
3180
3180
* Returns an Observable that emits the same values as the source observable with the exception of an
3181
- * {@code onError} . An {@code onError} notification from the source will result in the emission of a
3182
- * {@link Notification} to the Observable provided as an argument to the {@code notificationHandler}
3183
- * function. If the Observable returned {@code onCompletes} or {@code onErrors} then {@code retry} will call
3184
- * {@code onCompleted} or {@code onError} on the child subscription. Otherwise, this Observable will
3181
+ * ` onError` . An ` onError` notification from the source will result in the emission of a
3182
+ * [[ Notification ]] to the Observable provided as an argument to the ` notificationHandler`
3183
+ * function. If the Observable returned ` onCompletes` or ` onErrors` then ` retry` will call
3184
+ * ` onCompleted` or ` onError` on the child subscription. Otherwise, this Observable will
3185
3185
* resubscribe to the source Observable.
3186
3186
* <p>
3187
3187
* <img width="640" height="430" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/retryWhen.f.png" alt="">
@@ -3190,7 +3190,7 @@ trait Observable[+T]
3190
3190
*
3191
3191
* This retries 3 times, each time incrementing the number of seconds it waits.
3192
3192
*
3193
- * <pre> {@code
3193
+ * <pre>
3194
3194
* Observable[String]({ subscriber =>
3195
3195
* println("subscribing")
3196
3196
* subscriber.onError(new RuntimeException("always fails"))
@@ -3200,22 +3200,22 @@ trait Observable[+T]
3200
3200
* Observable.timer(Duration(i, TimeUnit.SECONDS))
3201
3201
* })
3202
3202
* }).toBlocking.foreach(s => println(s))
3203
- * } </pre>
3203
+ * </pre>
3204
3204
*
3205
3205
* Output is:
3206
3206
*
3207
- * <pre> {@code
3207
+ * <pre>
3208
3208
* subscribing
3209
3209
* delay retry by 1 second(s)
3210
3210
* subscribing
3211
3211
* delay retry by 2 second(s)
3212
3212
* subscribing
3213
3213
* delay retry by 3 second(s)
3214
3214
* subscribing
3215
- * } </pre>
3215
+ * </pre>
3216
3216
* <dl>
3217
3217
* <dt><b>Scheduler:</b></dt>
3218
- * <dd>{@code retryWhen} operates by default on the {@code trampoline} {@link Scheduler} .</dd>
3218
+ * <dd>` retryWhen` operates by default on the ` trampoline` [[ Scheduler ]] .</dd>
3219
3219
* </dl>
3220
3220
*
3221
3221
* @param notificationHandler receives an Observable of notifications with which a user can complete or error, aborting the
@@ -3235,16 +3235,16 @@ trait Observable[+T]
3235
3235
}
3236
3236
3237
3237
/**
3238
- * Returns an Observable that emits the same values as the source observable with the exception of an {@code onError} .
3239
- * An onError will emit a {@link Notification} to the observable provided as an argument to the notificationHandler
3240
- * func. If the observable returned {@code onCompletes} or {@code onErrors} then retry will call {@code onCompleted}
3241
- * or {@code onError} on the child subscription. Otherwise, this observable will resubscribe to the source observable, on a particular Scheduler.
3238
+ * Returns an Observable that emits the same values as the source observable with the exception of an ` onError` .
3239
+ * An onError will emit a [[ Notification ]] to the observable provided as an argument to the notificationHandler
3240
+ * func. If the observable returned ` onCompletes` or ` onErrors` then retry will call ` onCompleted`
3241
+ * or ` onError` on the child subscription. Otherwise, this observable will resubscribe to the source observable, on a particular Scheduler.
3242
3242
* <p>
3243
3243
* <img width="640" height="430" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/retryWhen.f.png" alt="">
3244
3244
* <p>
3245
3245
* <dl>
3246
3246
* <dt><b>Scheduler:</b></dt>
3247
- * <dd>you specify which {@link Scheduler} this operator will use</dd>
3247
+ * <dd>you specify which [[ Scheduler ]] this operator will use</dd>
3248
3248
* </dl>
3249
3249
*
3250
3250
* @param notificationHandler receives an Observable of notifications with which a user can complete or error, aborting the
@@ -3328,16 +3328,16 @@ trait Observable[+T]
3328
3328
3329
3329
/**
3330
3330
* Returns an Observable that emits the same values as the source Observable with the exception of an
3331
- * {@code onCompleted} . An {@code onCompleted} notification from the source will result in the emission of
3332
- * a {@link Notification} to the Observable provided as an argument to the {@code notificationHandler}
3333
- * function. If the Observable returned {@code onCompletes} or {@code onErrors} then {@code repeatWhen} will
3334
- * call {@code onCompleted} or {@code onError} on the child subscription. Otherwise, this Observable will
3331
+ * ` onCompleted` . An ` onCompleted` notification from the source will result in the emission of
3332
+ * a [[ Notification ]] to the Observable provided as an argument to the ` notificationHandler`
3333
+ * function. If the Observable returned ` onCompletes` or ` onErrors` then ` repeatWhen` will
3334
+ * call ` onCompleted` or ` onError` on the child subscription. Otherwise, this Observable will
3335
3335
* resubscribe to the source Observable, on a particular Scheduler.
3336
3336
* <p>
3337
3337
* <img width="640" height="430" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/repeatWhen.f.png" alt="">
3338
3338
* <dl>
3339
3339
* <dt><b>Scheduler:</b></dt>
3340
- * <dd>you specify which {@link Scheduler} this operator will use</dd>
3340
+ * <dd>you specify which [[ Scheduler ]] this operator will use</dd>
3341
3341
* </dl>
3342
3342
*
3343
3343
* @param notificationHandler receives an Observable of notifications with which a user can complete or error, aborting the repeat.
@@ -3359,16 +3359,16 @@ trait Observable[+T]
3359
3359
3360
3360
/**
3361
3361
* Returns an Observable that emits the same values as the source Observable with the exception of an
3362
- * {@code onCompleted} . An {@code onCompleted} notification from the source will result in the emission of
3363
- * a {@link Notification} to the Observable provided as an argument to the {@code notificationHandler}
3364
- * function. If the Observable returned {@code onCompletes} or {@code onErrors} then {@code repeatWhen} will
3365
- * call {@code onCompleted} or {@code onError} on the child subscription. Otherwise, this Observable will
3362
+ * ` onCompleted` . An ` onCompleted` notification from the source will result in the emission of
3363
+ * a [[ Notification ]] to the Observable provided as an argument to the ` notificationHandler`
3364
+ * function. If the Observable returned ` onCompletes` or ` onErrors` then ` repeatWhen` will
3365
+ * call ` onCompleted` or ` onError` on the child subscription. Otherwise, this Observable will
3366
3366
* resubscribe to the source observable.
3367
3367
* <p>
3368
3368
* <img width="640" height="430" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/repeatWhen.f.png" alt="">
3369
3369
* <dl>
3370
3370
* <dt><b>Scheduler:</b></dt>
3371
- * <dd>{@code repeatWhen} operates by default on the {@code trampoline} {@link Scheduler} .</dd>
3371
+ * <dd>` repeatWhen` operates by default on the ` trampoline` [[ Scheduler ]] .</dd>
3372
3372
* </dl>
3373
3373
*
3374
3374
* @param notificationHandler receives an Observable of notifications with which a user can complete or error, aborting the repeat.
@@ -3787,7 +3787,7 @@ trait Observable[+T]
3787
3787
3788
3788
/**
3789
3789
* Return an Observable that emits a single Map containing values corresponding to items emitted by the
3790
- * source Observable, mapped by the keys returned by a specified {@code keySelector} function.
3790
+ * source Observable, mapped by the keys returned by a specified ` keySelector` function.
3791
3791
* <p>
3792
3792
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toMap.png">
3793
3793
* <p>
@@ -3808,7 +3808,7 @@ trait Observable[+T]
3808
3808
}
3809
3809
3810
3810
/**
3811
- * Return an Observable that emits a single Map, returned by a specified {@code mapFactory} function, that
3811
+ * Return an Observable that emits a single Map, returned by a specified ` mapFactory` function, that
3812
3812
* contains keys and values extracted from the items emitted by the source Observable.
3813
3813
* <p>
3814
3814
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toMap.png">
@@ -3888,18 +3888,27 @@ trait Observable[+T]
3888
3888
}
3889
3889
3890
3890
/**
3891
- * Lift a function to the current Observable and return a new Observable that when subscribed to will pass
3892
- * the values of the current Observable through the function.
3891
+ * Lifts a function to the current Observable and returns a new Observable that when subscribed to will pass
3892
+ * the values of the current Observable through the Operator function.
3893
3893
* <p>
3894
3894
* In other words, this allows chaining Observers together on an Observable for acting on the values within
3895
3895
* the Observable.
3896
3896
* {{{
3897
- * observable.map(...).filter(...).take(5).lift(new ObserverA ()).lift(new ObserverB (...)).subscribe()
3897
+ * observable.map(...).filter(...).take(5).lift(new OperatorA ()).lift(new OperatorB (...)).subscribe()
3898
3898
* }}}
3899
+ * If the operator you are creating is designed to act on the individual items emitted by a source
3900
+ * Observable, use `lift`. If your operator is designed to transform the source Observable as a whole
3901
+ * (for instance, by applying a particular set of existing RxJava operators to it) use `#compose`.
3902
+ * <dl>
3903
+ * <dt><b>Scheduler:</b></dt>
3904
+ * <dd>`lift` does not operate by default on a particular [[Scheduler ]].</dd>
3905
+ * </dl>
3899
3906
*
3900
- * @param operator
3901
- * @return an Observable that emits values that are the result of applying the bind function to the values
3902
- * of the current Observable
3907
+ * @param operator the Operator that implements the Observable-operating function to be applied to the source
3908
+ * Observable
3909
+ * @return an Observable that is the result of applying the lifted Operator to the source Observable
3910
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Implementing-Your-Own-Operators">RxJava wiki: Implementing Your Own Operators</a>
3911
+ * @since 0.17
3903
3912
*/
3904
3913
def lift [R ](operator : Subscriber [R ] => Subscriber [T ]): Observable [R ] = {
3905
3914
toScalaObservable(asJavaObservable.lift(toJavaOperator[T , R ](operator)))
@@ -4620,25 +4629,25 @@ object Observable {
4620
4629
}
4621
4630
4622
4631
/**
4623
- * Return an Observable that emits a 0L after the {@code initialDelay} and ever increasing
4624
- * numbers after each {@code period} of time thereafter, on a specified Scheduler.
4632
+ * Return an Observable that emits a 0L after the ` initialDelay` and ever increasing
4633
+ * numbers after each ` period` of time thereafter, on a specified Scheduler.
4625
4634
* <p>
4626
4635
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/timer.ps.png">
4627
4636
*
4628
4637
* @param initialDelay
4629
4638
* the initial delay time to wait before emitting the first value of 0L
4630
4639
* @param period
4631
4640
* the period of time between emissions of the subsequent numbers
4632
- * @return an Observable that emits a 0L after the { @code initialDelay} and ever increasing
4633
- * numbers after each { @code period} of time thereafter, while running on the given { @code scheduler}
4641
+ * @return an Observable that emits a 0L after the ` initialDelay` and ever increasing
4642
+ * numbers after each ` period` of time thereafter, while running on the given ` scheduler`
4634
4643
*/
4635
4644
def timer (initialDelay : Duration , period : Duration ): Observable [Long ] = {
4636
4645
toScalaObservable[java.lang.Long ](rx.Observable .timer(initialDelay.toNanos, period.toNanos, duration.NANOSECONDS )).map(_.longValue())
4637
4646
}
4638
4647
4639
4648
/**
4640
- * Return an Observable that emits a 0L after the {@code initialDelay} and ever increasing
4641
- * numbers after each {@code period} of time thereafter, on a specified Scheduler.
4649
+ * Return an Observable that emits a 0L after the ` initialDelay` and ever increasing
4650
+ * numbers after each ` period` of time thereafter, on a specified Scheduler.
4642
4651
* <p>
4643
4652
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/timer.ps.png">
4644
4653
*
@@ -4647,9 +4656,9 @@ object Observable {
4647
4656
* @param period
4648
4657
* the period of time between emissions of the subsequent numbers
4649
4658
* @param scheduler
4650
- * the scheduler on which the waiting happens and items are emitted
4651
- * @return an Observable that emits a 0L after the { @code initialDelay} and ever increasing
4652
- * numbers after each { @code period} of time thereafter, while running on the given { @code scheduler}
4659
+ * the scheduler on which the waiting happens and items are emitted
4660
+ * @return an Observable that emits a 0L after the ` initialDelay` and ever increasing
4661
+ * numbers after each ` period` of time thereafter, while running on the given ` scheduler`
4653
4662
*/
4654
4663
def timer (initialDelay : Duration , period : Duration , scheduler : Scheduler ): Observable [Long ] = {
4655
4664
toScalaObservable[java.lang.Long ](rx.Observable .timer(initialDelay.toNanos, period.toNanos, duration.NANOSECONDS , scheduler)).map(_.longValue())
0 commit comments