You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Write the function you pass to {@code create} so that it behaves as an Observable: It should
183
-
* invoke the Observer's {@link Subscriber#onNext onNext}, {@link Subscriber#onError onError}, and {@link Subscriber#onCompleted onCompleted} methods appropriately.
184
+
* invoke the Subscriber's {@link Subscriber#onNext onNext}, {@link Subscriber#onError onError},
185
+
* and {@link Subscriber#onCompleted onCompleted} methods appropriately.
184
186
* <p>
185
-
* A well-formed Observable must invoke either the Observer's {@code onCompleted} method
187
+
* A well-formed Observable must invoke either the Subscriber's {@code onCompleted} method
186
188
* exactly once or its {@code onError} method exactly once.
187
189
* <p>
188
190
* See <a href="http://go.microsoft.com/fwlink/?LinkID=205219">Rx Design Guidelines (PDF)</a>
189
191
* for detailed information.
190
192
*
191
193
* @param <T>
192
194
* the type of the items that this Observable emits
193
-
* @param func
194
-
* a function that accepts an {@code Observer<T>}, invokes its {@code onNext}, {@code onError}, and {@code onCompleted} methods as appropriate, and returns a {@link Subscription} that
195
-
* allows the Observer to cancel the subscription
196
-
* @return an Observable that, when an {@link Subscriber} subscribes to it, will execute the
195
+
* @param f
196
+
* a function that accepts an {@code Subscriber<T>}, and invokes its {@code onNext},
197
+
* {@code onError}, and {@code onCompleted} methods as appropriate
198
+
* @return an Observable that, when a {@link Subscriber} subscribes to it, will execute the
* Note: the entire iterable sequence is immediately emitted each time an {@link Observer} subscribes. Since this occurs before the {@link Subscription} is returned, it is not possible
1199
-
* to unsubscribe from the sequence before it completes.
1200
1208
*
1201
1209
* @param iterable
1202
1210
* the source {@link Iterable} sequence
@@ -1236,10 +1244,6 @@ public final static <T> Observable<T> from(Iterable<? extends T> iterable, Sched
1236
1244
* Converts an item into an Observable that emits that item.
* <em>Note:</em> the entire array is immediately emitted each time an {@link Observer} subscribes. Since this occurs before the {@link Subscription} is returned, it is not possible
1556
-
* to unsubscribe from the sequence before it completes.
1557
1526
*
1558
1527
* @param items
1559
1528
* the source array
@@ -1573,9 +1542,6 @@ public final static <T> Observable<T> from(T... t1) {
* <em>Note:</em> the entire array is immediately emitted each time an {@link Observer} subscribes. Since this occurs before the {@link Subscription} is returned, it is not
1578
-
* possible to unsubscribe from the sequence before it completes.
1579
1545
*
1580
1546
* @param items
1581
1547
* the source array
@@ -3805,12 +3771,15 @@ public final <B> Observable<List<T>> buffer(Observable<B> boundary, int initialC
* This is useful when you want an Observable to cache responses and you can't control the
3808
-
* subscribe/unsubscribe behavior of all the {@link Observer}s.
3774
+
* subscribe/unsubscribe behavior of all the {@link Subscriber}s.
3809
3775
* <p>
3810
3776
* When you call {@code cache()}, it does not yet subscribe to the source Observable. This only
3811
-
* happens when {@code subscribe} is called the first time on the Observable returned by {@code cache()}.
3777
+
* happens when {@code subscribe} is called the first time on the Observable returned by
3778
+
* {@code cache()}.
3812
3779
* <p>
3813
-
* <em>Note:</em> You sacrifice the ability to unsubscribe from the origin when you use the {@code cache()} Observer so be careful not to use this Observer on Observables that emit an
3780
+
* <!-- IS THIS NOTE STILL VALID??? -->
3781
+
* <em>Note:</em> You sacrifice the ability to unsubscribe from the origin when you use the
3782
+
* {@code cache()} Observer so be careful not to use this Observer on Observables that emit an
3814
3783
* infinite or very large number of items that will use up memory.
3815
3784
*
3816
3785
* @return an Observable that, when first subscribed to, caches all of its items and
0 commit comments