File tree 2 files changed +399
-0
lines changed
rxjava-core/src/main/java/rx
2 files changed +399
-0
lines changed Original file line number Diff line number Diff line change 36
36
import rx .operators .OperationMaterialize ;
37
37
import rx .operators .OperationMerge ;
38
38
import rx .operators .OperationMergeDelayError ;
39
+ import rx .operators .OperationNext ;
39
40
import rx .operators .OperationOnErrorResumeNextViaFunction ;
40
41
import rx .operators .OperationOnErrorResumeNextViaObservable ;
41
42
import rx .operators .OperationOnErrorReturn ;
@@ -1710,6 +1711,17 @@ public Iterator<T> iterator() {
1710
1711
};
1711
1712
}
1712
1713
1714
+ /**
1715
+ * Samples the next value (blocking without buffering) from in an observable sequence.
1716
+ *
1717
+ * @param items the source observable sequence.
1718
+ * @param <T> the type of observable.
1719
+ * @return iterable that blocks upon each iteration until the next element in the observable source sequence becomes available.
1720
+ */
1721
+ public static <T > Iterable <T > next (Observable <T > items ) {
1722
+ return OperationNext .next (items );
1723
+ }
1724
+
1713
1725
/**
1714
1726
* Returns the only element of an observable sequence and throws an exception if there is not exactly one element in the observable sequence.
1715
1727
*
@@ -2892,6 +2904,15 @@ public Iterable<T> toIterable() {
2892
2904
return toIterable (this );
2893
2905
}
2894
2906
2907
+ /**
2908
+ * Samples the next value (blocking without buffering) from in an observable sequence.
2909
+ *
2910
+ * @return iterable that blocks upon each iteration until the next element in the observable source sequence becomes available.
2911
+ */
2912
+ public Iterable <T > next () {
2913
+ return next (this );
2914
+ }
2915
+
2895
2916
public static class UnitTest {
2896
2917
2897
2918
@ Mock
You can’t perform that action at this time.
0 commit comments