File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
rxjava-core/src/main/java/rx Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1930,6 +1930,23 @@ public static <T> Observable<T> switchDo(Observable<? extends Observable<? exten
1930
1930
public static <T > Observable <T > switchOnNext (Observable <? extends Observable <? extends T >> sequenceOfSequences ) {
1931
1931
return create (OperationSwitch .switchDo (sequenceOfSequences ));
1932
1932
}
1933
+
1934
+ /**
1935
+ * Given an Observable that emits Observables, returns an Observable that
1936
+ * emits the items emitted by the most recently emitted of those
1937
+ * Observables.
1938
+ * <p>
1939
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/switchDo.png">
1940
+ *
1941
+ * @param sequenceOfSequences the source Observable that emits Observables
1942
+ * @return an Observable that emits only the items emitted by the Observable
1943
+ * most recently emitted by the source Observable
1944
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Combining-Observables#switchonnext">RxJava Wiki: switchOnNext()</a>
1945
+ * @see {@link #switchOnNext(Observable)}
1946
+ */
1947
+ public static <T > Observable <T > switchLatest (Observable <? extends Observable <? extends T >> sequenceOfSequences ) {
1948
+ return create (OperationSwitch .switchDo (sequenceOfSequences ));
1949
+ }
1933
1950
1934
1951
/**
1935
1952
* Return an Observable that subscribes to an observable sequence
You can’t perform that action at this time.
0 commit comments