Skip to content

Commit a658325

Browse files
committed
A handful more javadoc changes (misnamed @params and such)
1 parent 7614c9c commit a658325

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

src/main/java/rx/Single.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ public class Single<T> {
7373
/**
7474
* Creates a Single with a Function to execute when it is subscribed to (executed).
7575
* <p>
76-
* <em>Note:</em> Use {@link #create(OnExecute)} to create a Single, instead of this constructor,
76+
* <em>Note:</em> Use {@link #create(OnSubscribe)} to create a Single, instead of this constructor,
7777
* unless you specifically have a need for inheritance.
7878
*
7979
* @param f
80-
* {@link OnExecute} to be executed when {@link #execute(SingleSubscriber)} or
81-
* {@link #subscribe(Subscriber)} is called
80+
* {@code OnExecute} to be executed when {@code execute(SingleSubscriber)} or
81+
* {@code subscribe(Subscriber)} is called
8282
*/
8383
protected Single(final OnSubscribe<T> f) {
8484
// bridge between OnSubscribe (which all Operators and Observables use) and OnExecute (for Single)
@@ -1294,11 +1294,11 @@ public final Single<T> observeOn(Scheduler scheduler) {
12941294
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.onErrorReturn.png" alt="">
12951295
* <p>
12961296
* By default, when a Single encounters an error that prevents it from emitting the expected item to its
1297-
* subscriber, the Single invokes its subscriber's {@link SingleSubscriber#onError} method, and then quits
1297+
* subscriber, the Single invokes its subscriber's {@link Subscriber#onError} method, and then quits
12981298
* without invoking any more of its subscriber's methods. The {@code onErrorReturn} method changes this
12991299
* behavior. If you pass a function ({@code resumeFunction}) to a Single's {@code onErrorReturn} method, if
13001300
* the original Single encounters an error, instead of invoking its subscriber's
1301-
* {@link SingleSubsriber#onError} method, it will instead emit the return value of {@code resumeFunction}.
1301+
* {@link Subscriber#onError} method, it will instead emit the return value of {@code resumeFunction}.
13021302
* <p>
13031303
* You can use this to prevent errors from propagating or to supply fallback data should errors be
13041304
* encountered.
@@ -1357,7 +1357,7 @@ public final void onNext(T args) {
13571357
* <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
13581358
* </dl>
13591359
*
1360-
* @param onNext
1360+
* @param onSuccess
13611361
* the {@code Action1<T>} you have designed to accept the emission from the Single
13621362
* @return a {@link Subscription} reference can request the {@link Single} stop work.
13631363
* @throws IllegalArgumentException
@@ -1399,7 +1399,7 @@ public final void onNext(T args) {
13991399
* <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
14001400
* </dl>
14011401
*
1402-
* @param onNext
1402+
* @param onSuccess
14031403
* the {@code Action1<T>} you have designed to accept the emission from the Single
14041404
* @param onError
14051405
* the {@code Action1<Throwable>} you have designed to accept any error notification from the
@@ -1593,17 +1593,17 @@ public final Subscription subscribe(Subscriber<? super T> subscriber) {
15931593
* <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
15941594
* </dl>
15951595
*
1596-
* @param subscriber
1597-
* the {@link Subscriber} that will handle the emission or notification from the Single
1596+
* @param te
1597+
* the {@link SingleSubscriber} that will handle the emission or notification from the Single
15981598
* @return a {@link Subscription} reference can request the {@link Single} stop work.
15991599
* @throws IllegalStateException
16001600
* if {@code subscribe} is unable to obtain an {@code OnSubscribe<>} function
16011601
* @throws IllegalArgumentException
1602-
* if the {@link Subscriber} provided as the argument to {@code subscribe} is {@code null}
1602+
* if the {@link SingleSubscriber} provided as the argument to {@code subscribe} is {@code null}
16031603
* @throws OnErrorNotImplementedException
1604-
* if the {@link Subscriber}'s {@code onError} method is null
1604+
* if the {@link SingleSubscriber}'s {@code onError} method is null
16051605
* @throws RuntimeException
1606-
* if the {@link Subscriber}'s {@code onError} method itself threw a {@code Throwable}
1606+
* if the {@link SingleSubscriber}'s {@code onError} method itself threw a {@code Throwable}
16071607
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
16081608
*/
16091609
public final Subscription subscribe(final SingleSubscriber<? super T> te) {

src/main/java/rx/SingleSubscriber.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
/**
2222
* Provides a mechanism for receiving push-based notifications.
2323
* <p>
24-
* After an SingleSubscriber calls an {@link Single}'s {@link Single#subscribe subscribe} method, the
25-
* {@code Single} calls the SingleSubscriber's {@link #onSuccess} and {@link #onError} methods to provide notifications.
26-
* A well-behaved {@code Single} will call an SingleSubscriber's {@link #onSuccess} method exactly once or
27-
* the SingleSubscriber's {@link #onError} method exactly once.
24+
* After a SingleSubscriber calls a {@link Single}'s {@link Single#subscribe subscribe} method, the
25+
* {@code Single} calls the SingleSubscriber's {@link #onSuccess} and {@link #onError} methods to provide
26+
* notifications. A well-behaved {@code Single} will call a SingleSubscriber's {@link #onSuccess} method exactly
27+
* once or the SingleSubscriber's {@link #onError} method exactly once.
2828
*
2929
* @see <a href="http://reactivex.io/documentation/observable.html">ReactiveX documentation: Observable</a>
3030
* @param <T>
@@ -36,9 +36,13 @@ public abstract class SingleSubscriber<T> implements Subscription {
3636
private final SubscriptionList cs = new SubscriptionList();
3737

3838
/**
39-
* Notifies the SingleSubscriber with a single item and that the {@link Single} has finished sending push-based notifications.
39+
* Notifies the SingleSubscriber with a single item and that the {@link Single} has finished sending
40+
* push-based notifications.
4041
* <p>
4142
* The {@link Single} will not call this method if it calls {@link #onError}.
43+
*
44+
* @param value
45+
* the item emitted by the Single
4246
*/
4347
public abstract void onSuccess(T value);
4448

@@ -47,7 +51,7 @@ public abstract class SingleSubscriber<T> implements Subscription {
4751
* <p>
4852
* If the {@link Single} calls this method, it will not thereafter call {@link #onSuccess}.
4953
*
50-
* @param e
54+
* @param error
5155
* the exception encountered by the Single
5256
*/
5357
public abstract void onError(Throwable error);
@@ -78,4 +82,4 @@ public final void unsubscribe() {
7882
public final boolean isUnsubscribed() {
7983
return cs.isUnsubscribed();
8084
}
81-
}
85+
}

0 commit comments

Comments
 (0)