Skip to content

Commit

Permalink
fixing a variety of errors in javadoc generation (syntax errors, misn…
Browse files Browse the repository at this point in the history
…amed params, etc.)
  • Loading branch information
DavidMGross committed Mar 9, 2014
1 parent 940c26e commit a0ebbc7
Show file tree
Hide file tree
Showing 13 changed files with 453 additions and 411 deletions.
52 changes: 25 additions & 27 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public static interface OnSubscribeFunc<T> extends Function {
* observable.map(...).filter(...).take(5).lift(new ObserverA()).lift(new ObserverB(...)).subscribe()
* }
*
* @param bind
* @param lift
* @return an Observable that emits values that are the result of applying the bind function to the values
* of the current Observable
*/
Expand Down Expand Up @@ -1552,7 +1552,7 @@ public final static <T> Observable<T> from(T t1, T t2, T t3, T t4, T t5, T t6, T
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/from.png">
*
* @param items
* @param t1
* the source Array
* @param <T>
* the type of items in the Array and the type of items to be emitted by the resulting Observable
Expand Down Expand Up @@ -1680,7 +1680,7 @@ public final static <T> Observable<T> just(T value, Scheduler scheduler) {
* if the source is empty
* @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#wiki-max">RxJava Wiki: max()</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211837.aspx">MSDN: Observable.Max</a>
* @deprecated Use rxjava-math module instead
* @deprecated use rxjava-math module instead
*/
public final static <T extends Comparable<? super T>> Observable<T> max(Observable<T> source) {
return OperationMinMax.max(source);
Expand Down Expand Up @@ -2680,7 +2680,7 @@ public final static <T> Observable<T> switchDo(Observable<? extends Observable<?
* @return an Observable that emits the items emitted by the Observable most recently emitted by the source
* Observable
* @see <a href="https://github.com/Netflix/RxJava/wiki/Combining-Observables#wiki-switchonnext">RxJava Wiki: switchOnNext()</a>
* @see {@link #switchOnNext(Observable)}
* @see #switchOnNext(Observable)
*/
public final static <T> Observable<T> switchLatest(Observable<? extends Observable<? extends T>> sequenceOfSequences) {
return create(OperationSwitch.switchDo(sequenceOfSequences));
Expand Down Expand Up @@ -4308,7 +4308,7 @@ public final void onNext(T args) {
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/doOnEach.png">
*
* @param observer
* @param onNotification
* the action to invoke for each item emitted by the source Observable
* @return the source Observable with the side-effecting behavior applied
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-dooneach">RxJava Wiki: doOnEach()</a>
Expand Down Expand Up @@ -4503,7 +4503,7 @@ public final Observable<T> elementAtOrDefault(int index, T defaultValue) {
* @return an Observable that emits a Boolean that indicates whether any item emitted by the source
* Observable satisfies the {@code predicate}
* @see <a href="https://github.com/Netflix/RxJava/wiki/Conditional-and-Boolean-Operators#wiki-exists-and-isempty">RxJava Wiki: exists()</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211993.aspx">MSDN: Observable.Any</a> Note: the description in this page was wrong at the time of this writing.
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211993.aspx">MSDN: Observable.Any (Note: the description in this page was wrong at the time of this writing)</a>
*/
public final Observable<Boolean> exists(Func1<? super T, Boolean> predicate) {
return create(OperationAny.exists(this, predicate));
Expand Down Expand Up @@ -4551,7 +4551,7 @@ public final Observable<T> finallyDo(Action0 action) {
* @return an Observable that emits only the very first item emitted by the source Observable, or raises an
* {@code IllegalArgumentException} if the source Observable is empty
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-first">RxJava Wiki: first()</a>
* @see MSDN: {@code Observable.firstAsync()}
* @see "MSDN: Observable.firstAsync()"
*/
public final Observable<T> first() {
return take(1).single();
Expand All @@ -4568,7 +4568,7 @@ public final Observable<T> first() {
* @return an Observable that emits only the very first item emitted by the source Observable that satisfies
* the {@code predicate}, or raises an {@code IllegalArgumentException} if no such items are emitted
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-first">RxJava Wiki: first()</a>
* @see MSDN: {@code Observable.firstAsync()}
* @see "MSDN: Observable.firstAsync()"
*/
public final Observable<T> first(Func1<? super T, Boolean> predicate) {
return takeFirst(predicate).single();
Expand All @@ -4585,7 +4585,7 @@ public final Observable<T> first(Func1<? super T, Boolean> predicate) {
* @return an Observable that emits only the very first item from the source, or a default item if the
* source Observable completes without emitting any items
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-firstordefault">RxJava Wiki: firstOrDefault()</a>
* @see MSDN: {@code Observable.firstOrDefaultAsync()}
* @see "MSDN: Observable.firstOrDefaultAsync()"
*/
public final Observable<T> firstOrDefault(T defaultValue) {
return take(1).singleOrDefault(defaultValue);
Expand All @@ -4605,7 +4605,7 @@ public final Observable<T> firstOrDefault(T defaultValue) {
* @return an Observable that emits only the very first item emitted by the source Observable that satisfies
* the {@code predicate}, or a default item if the source Observable emits no such items
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-firstordefault">RxJava Wiki: firstOrDefault()</a>
* @see MSDN: {@code Observable.firstOrDefaultAsync()}
* @see "MSDN: Observable.firstOrDefaultAsync()"
*/
public final Observable<T> firstOrDefault(T defaultValue, Func1<? super T, Boolean> predicate) {
return takeFirst(predicate).singleOrDefault(defaultValue);
Expand Down Expand Up @@ -4784,7 +4784,7 @@ public final <TRight, TLeftDuration, TRightDuration, R> Observable<R> join(Obser
* @return an Observable that emits the last item from the source Observable or notifies observers of an
* error
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observable-Operators#wiki-last">RxJava Wiki: last()</a>
* @see MSDN: {@code Observable.lastAsync()}
* @see "MSDN: Observable.lastAsync()"
*/
public final Observable<T> last() {
return takeLast(1).single();
Expand All @@ -4803,7 +4803,7 @@ public final Observable<T> last() {
* @throws IllegalArgumentException
* if no items that match the predicate are emitted by the source Observable
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observable-Operators#wiki-last">RxJava Wiki: last()</a>
* @see MSDN: {@code Observable.lastAsync()}
* @see "MSDN: Observable.lastAsync()"
*/
public final Observable<T> last(Func1<? super T, Boolean> predicate) {
return filter(predicate).takeLast(1).single();
Expand All @@ -4820,7 +4820,7 @@ public final Observable<T> last(Func1<? super T, Boolean> predicate) {
* @return an Observable that emits only the last item emitted by the source Observable, or a default item
* if the source Observable is empty
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-lastOrDefault">RxJava Wiki: lastOrDefault()</a>
* @see MSDN: {@code Observable.lastOrDefaultAsync()}
* @see "MSDN: Observable.lastOrDefaultAsync()"
*/
public final Observable<T> lastOrDefault(T defaultValue) {
return takeLast(1).singleOrDefault(defaultValue);
Expand All @@ -4840,7 +4840,7 @@ public final Observable<T> lastOrDefault(T defaultValue) {
* @return an Observable that emits only the last item emitted by the source Observable that satisfies the
* given condition, or a default item if no such item is emitted by the source Observable
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-lastOrDefault">RxJava Wiki: lastOrDefault()</a>
* @see MSDN: {@code Observable.lastOrDefaultAsync()}
* @see "MSDN: Observable.lastOrDefaultAsync()"
*/
public final Observable<T> lastOrDefault(T defaultValue, Func1<? super T, Boolean> predicate) {
return filter(predicate).takeLast(1).singleOrDefault(defaultValue);
Expand Down Expand Up @@ -5355,7 +5355,7 @@ public final Observable<T> onExceptionResumeNext(final Observable<? extends T> r
* @param f
* a {@link Func1} that applies Observable Observers to {@code Observable<T>} in parallel and
* returns an {@code Observable<R>}
* @return an Observable that emits the results of applying {@link f} to the items emitted by the source
* @return an Observable that emits the results of applying {@code f} to the items emitted by the source
* Observable
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-parallel">RxJava Wiki: parallel()</a>
*/
Expand All @@ -5376,7 +5376,7 @@ public final <R> Observable<R> parallel(Func1<Observable<T>, Observable<R>> f) {
* returns an {@code Observable<R>}
* @param s
* a {@link Scheduler} to perform the work on
* @return an Observable that emits the results of applying {@link f} to the items emitted by the source
* @return an Observable that emits the results of applying {@code f} to the items emitted by the source
* Observable
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-parallel">RxJava Wiki: parallel()</a>
*/
Expand Down Expand Up @@ -5450,7 +5450,7 @@ public final Subject<T, T> call() {
* @param initialValue
* the initial value of the underlying {@link BehaviorSubject}
* @return an Observable that emits {@code initialValue} followed by the results of invoking the selector
* on a {@ConnectableObservable} that shares a single subscription to the underlying Observable
* on a {@link ConnectableObservable} that shares a single subscription to the underlying Observable
*/
public final <R> Observable<R> publish(Func1<? super Observable<T>, ? extends Observable<R>> selector, final T initialValue) {
return multicast(new Func0<Subject<T, T>>() {
Expand Down Expand Up @@ -6208,7 +6208,7 @@ public final <R> Observable<R> scan(R initialValue, Func2<R, ? super T, R> accum
* @throws IllegalArgumentException
* if the source emits more than one item or no items
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-single-and-singleordefault">RxJava Wiki: single()</a>
* @see MSDN: {@code Observable.singleAsync()}
* @see "MSDN: Observable.singleAsync()"
*/
public final Observable<T> single() {
return create(OperationSingle.<T> single(this));
Expand All @@ -6229,7 +6229,7 @@ public final Observable<T> single() {
* if the source Observable emits either more than one item that matches the predicate or no
* items that match the predicate
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-single-and-singleordefault">RxJava Wiki: single()</a>
* @see MSDN: {@code Observable.singleAsync()}
* @see "MSDN: Observable.singleAsync()"
*/
public final Observable<T> single(Func1<? super T, Boolean> predicate) {
return filter(predicate).single();
Expand All @@ -6249,7 +6249,7 @@ public final Observable<T> single(Func1<? super T, Boolean> predicate) {
* @throws IllegalArgumentException
* if the source Observable emits more than one item
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-single-and-singleordefault">RxJava Wiki: single()</a>
* @see MSDN: {@code Observable.singleOrDefaultAsync()}
* @see "MSDN: Observable.singleOrDefaultAsync()"
*/
public final Observable<T> singleOrDefault(T defaultValue) {
return create(OperationSingle.<T> singleOrDefault(this, defaultValue));
Expand All @@ -6272,7 +6272,7 @@ public final Observable<T> singleOrDefault(T defaultValue) {
* @throws IllegalArgumentException
* if the source Observable emits more than one item that matches the predicate
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-single-and-singleordefault">RxJava Wiki: single()</a>
* @see MSDN: {@code Observable.singleOrDefaultAsync()}
* @see "MSDN: Observable.singleOrDefaultAsync()"
*/
public final Observable<T> singleOrDefault(T defaultValue, Func1<? super T, Boolean> predicate) {
return filter(predicate).singleOrDefault(defaultValue);
Expand Down Expand Up @@ -7140,8 +7140,7 @@ public final Subscription subscribe(Subscriber<? super T> observer, Scheduler sc
}

/**
* Asynchronously subscribes Observers to this Observable on the specified
* {@link Scheduler}.
* Asynchronously subscribes Observers to this Observable on the specified {@link Scheduler}.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/subscribeOn.png">
*
Expand All @@ -7150,7 +7149,6 @@ public final Subscription subscribe(Subscriber<? super T> observer, Scheduler sc
* @return the source Observable modified so that its subscriptions happen on the
* specified {@link Scheduler}
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#wiki-subscribeon">RxJava Wiki: subscribeOn()</a>
* @see #subscribeOn(rx.Scheduler, int)
*/
public final Observable<T> subscribeOn(Scheduler scheduler) {
return nest().lift(new OperatorSubscribeOn<T>(scheduler));
Expand Down Expand Up @@ -7354,7 +7352,7 @@ public final Observable<T> take(long time, TimeUnit unit, Scheduler scheduler) {
* @return an Observable that emits only the very first item emitted by the source Observable, or an empty
* Observable if the source Observable completes without emitting a single item
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-first">RxJava Wiki: first()</a>
* @see MSDN: {@code Observable.firstAsync()}
* @see "MSDN: Observable.firstAsync()"
* @deprecated use {@code take(1)} directly
*/
@Deprecated
Expand All @@ -7374,7 +7372,7 @@ public final Observable<T> takeFirst() {
* the given condition, or that completes without emitting anything if the source Observable
* completes without emitting a single condition-satisfying item
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-first">RxJava Wiki: first()</a>
* @see MSDN: {@code Observable.firstAsync()}
* @see "MSDN: Observable.firstAsync()"
*/
public final Observable<T> takeFirst(Func1<? super T, Boolean> predicate) {
return filter(predicate).take(1);
Expand Down Expand Up @@ -7638,7 +7636,7 @@ public final Observable<T> takeWhileWithIndex(final Func2<? super T, ? super Int
*
* @param selector
* selector that will be invoked for items emitted by the source Observable
* @return a {@link Plan} that produces the projected results, to be fed (with other Plans) to the
* @return a {@link Plan0} that produces the projected results, to be fed (with other Plans) to the
* {@link #when} Observer
* @throws NullPointerException
* if {@code selector} is null
Expand Down
18 changes: 11 additions & 7 deletions rxjava-core/src/main/java/rx/Observer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
/**
* Provides a mechanism for receiving push-based notifications.
* <p>
* After an Observer calls an {@link Observable}'s <code>Observable.subscribe</code> method, the {@link Observable} calls the
* Observer's <code>onNext</code> method to provide notifications. A well-behaved {@link Observable} will call an Observer's
* <code>onCompleted</code> closure exactly once or the Observer's <code>onError</code> closure exactly once.
* After an Observer calls an {@link Observable}'s <code>Observable.subscribe</code> method, the
* {@link Observable} calls the Observer's <code>onNext</code> method to provide notifications. A well-behaved
* {@link Observable} will call an Observer's <code>onCompleted</code> closure exactly once or the Observer's
* <code>onError</code> closure exactly once.
* <p>
* For more information see the <a href="https://github.com/Netflix/RxJava/wiki/Observable">RxJava Wiki</a>
*
Expand All @@ -38,7 +39,8 @@ public interface Observer<T> {
/**
* Notifies the Observer that the {@link Observable} has experienced an error condition.
* <p>
* If the {@link Observable} calls this closure, it will not thereafter call <code>onNext</code> or <code>onCompleted</code>.
* If the {@link Observable} calls this closure, it will not thereafter call <code>onNext</code> or
* <code>onCompleted</code>.
*
* @param e
*/
Expand All @@ -47,11 +49,13 @@ public interface Observer<T> {
/**
* Provides the Observer with new data.
* <p>
* The {@link Observable} calls this closure 1 or more times, unless it calls <code>onError</code> in which case this closure may never be called.
* The {@link Observable} calls this closure 1 or more times, unless it calls <code>onError</code> in which
* case this closure may never be called.
* <p>
* The {@link Observable} will not call this closure again after it calls either <code>onCompleted</code> or <code>onError</code>.
* The {@link Observable} will not call this closure again after it calls either <code>onCompleted</code> or
* <code>onError</code>.
*
* @param args
* @param t
*/
public abstract void onNext(T t);

Expand Down
Loading

0 comments on commit a0ebbc7

Please sign in to comment.