Skip to content

Commit 8fd44d6

Browse files
committed
Add javadoc comments to individual OperationFoo files
1 parent 82541b2 commit 8fd44d6

36 files changed

+293
-51
lines changed

rxjava-core/src/main/java/rx/operators/OperationAll.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
import static org.mockito.Mockito.verify;
1313
import static org.mockito.Mockito.verifyNoMoreInteractions;
1414

15+
/**
16+
* Returns an Observable that emits a Boolean that indicates whether all items emitted by an
17+
* Observable satisfy a condition.
18+
* <p>
19+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/all.png">
20+
*/
1521
public class OperationAll {
1622

1723
public static <T> Func1<Observer<Boolean>, Subscription> all(Observable<T> sequence, Func1<T, Boolean> predicate) {

rxjava-core/src/main/java/rx/operators/OperationCache.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@
3333
import rx.util.functions.Func1;
3434

3535
/**
36-
* Similar to {@link Observable#replay()} except that this auto-subscribes to the source sequence.
36+
* This method has similar behavior to {@link Observable#replay()} except that this auto-subscribes
37+
* to the source Observable rather than returning a connectable Observable.
3738
* <p>
38-
* This is useful when returning an Observable that you wish to cache responses but can't control the
39+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/cache.png">
40+
* <p>
41+
* This is useful with an Observable that you want to cache responses when you can't control the
3942
* subscribe/unsubscribe behavior of all the Observers.
4043
* <p>
41-
* NOTE: You sacrifice the ability to unsubscribe from the origin with this operator so be careful to not
42-
* use this on infinite or very large sequences that will use up memory. This is similar to
43-
* the {@link Observable#toList()} operator in this caution.
44-
*
44+
* NOTE: You sacrifice the ability to unsubscribe from the origin when you use this operator, so be
45+
* careful not to use this operator on Observables that emit infinite or very large numbers of
46+
* items, as this will use up memory.
4547
*/
4648
public class OperationCache {
4749

rxjava-core/src/main/java/rx/operators/OperationConcat.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
import rx.util.Exceptions;
4141
import rx.util.functions.Func1;
4242

43+
/**
44+
* Returns an Observable that emits the items emitted by two or more Observables, one after the
45+
* other.
46+
* <p>
47+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/concat.png">
48+
*/
4349
public final class OperationConcat {
4450

4551
/**
@@ -690,4 +696,4 @@ public void run() {
690696
}
691697

692698
}
693-
}
699+
}

rxjava-core/src/main/java/rx/operators/OperationDematerialize.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727
import rx.util.functions.Func1;
2828

2929
/**
30-
* Dematerializes the explicit notification values of an observable sequence as implicit notifications.
31-
* See <a href="http://msdn.microsoft.com/en-us/library/hh229047(v=vs.103).aspx">here</a> for the Microsoft Rx equivalent.
30+
* Reverses the effect of {@link OperationMaterialize} by transforming the Notification objects
31+
* emitted by a source Observable into the items or notifications they represent.
32+
* <p>
33+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/dematerialize.png">
34+
* <p>
35+
* See <a href="http://msdn.microsoft.com/en-us/library/hh229047(v=vs.103).aspx">here</a> for the
36+
* Microsoft Rx equivalent.
3237
*/
3338
public final class OperationDematerialize {
3439

rxjava-core/src/main/java/rx/operators/OperationFilter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
import rx.Subscription;
2727
import rx.util.functions.Func1;
2828

29+
/**
30+
* Filters an Observable by discarding any items it emits that do not meet some test.
31+
* <p>
32+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/filter.png">
33+
*/
2934
public final class OperationFilter<T> {
3035

3136
public static <T> Func1<Observer<T>, Subscription> filter(Observable<T> that, Func1<T, Boolean> predicate) {
@@ -92,4 +97,4 @@ public Boolean call(String t1) {
9297
verify(aObserver, times(1)).onCompleted();
9398
}
9499
}
95-
}
100+
}

rxjava-core/src/main/java/rx/operators/OperationFinally.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
import rx.util.functions.Action0;
2727
import rx.util.functions.Func1;
2828

29+
/**
30+
* Registers an action to be called when an Observable invokes onComplete or onError.
31+
* <p>
32+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/finallyDo.png">
33+
* <p>
34+
* See also the <a href="http://msdn.microsoft.com/en-us/library/hh212133(v=vs.103).aspx">MSDN
35+
* Observable.Finally method</a>
36+
*/
2937
public final class OperationFinally {
3038

3139
/**

rxjava-core/src/main/java/rx/operators/OperationGroupBy.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
import rx.util.functions.Func1;
4141
import rx.util.functions.Functions;
4242

43+
/**
44+
* Groups the items emitted by an Observable according to a specified criterion, and emits these
45+
* grouped items as Observables, one Observable per group.
46+
* <p>
47+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/groupBy.png">
48+
*/
4349
public final class OperationGroupBy {
4450

4551
public static <K, T, R> Func1<Observer<GroupedObservable<K, R>>, Subscription> groupBy(Observable<T> source, final Func1<T, K> keySelector, final Func1<T, R> elementSelector) {

rxjava-core/src/main/java/rx/operators/OperationMap.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
import rx.Subscription;
3232
import rx.util.functions.Func1;
3333

34+
/**
35+
* Applies a function of your choosing to every item emitted by an Observable, and returns this
36+
* transformation as a new Observable.
37+
* <p>
38+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/map.png">
39+
*/
3440
public final class OperationMap {
3541

3642
/**

rxjava-core/src/main/java/rx/operators/OperationMaterialize.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@
2929
import rx.util.functions.Func1;
3030

3131
/**
32-
* Materializes the implicit notifications of an observable sequence as explicit notification values.
32+
* Turns all of the notifications from an Observable into <code>onNext</code> emissions, and marks
33+
* them with their original notification types within {@link Notification} objects.
3334
* <p>
34-
* In other words, converts a sequence of OnNext, OnError and OnCompleted events into a sequence of ObservableNotifications containing the OnNext, OnError and OnCompleted values.
35+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/materialize.png">
3536
* <p>
36-
* See <a href="http://msdn.microsoft.com/en-us/library/hh229453(v=VS.103).aspx">here</a> for the Microsoft Rx equivalent.
37+
* See <a href="http://msdn.microsoft.com/en-us/library/hh229453(v=VS.103).aspx">here</a> for the
38+
* Microsoft Rx equivalent.
3739
*/
3840
public final class OperationMaterialize {
3941

rxjava-core/src/main/java/rx/operators/OperationMerge.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
import rx.Subscription;
3838
import rx.util.functions.Func1;
3939

40+
/**
41+
* Flattens a list of Observables into one Observable sequence, without any transformation.
42+
* <p>
43+
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/merge.png">
44+
* <p>
45+
* You can combine the items emitted by multiple Observables so that they act like a single
46+
* Observable, by using the merge operation.
47+
*/
4048
public final class OperationMerge {
4149

4250
/**

0 commit comments

Comments
 (0)