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 @@ -547,6 +547,23 @@ public static <T> Observable<T> empty() {
547
547
return from (new ArrayList <T >());
548
548
}
549
549
550
+ /**
551
+ * Returns an Observable that emits no data to the {@link Observer} and immediately invokes
552
+ * its {@link Observer#onCompleted onCompleted} method with the specified scheduler.
553
+ * <p>
554
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/empty.png">
555
+ * @param scheduler
556
+ * the scheduler to call the {@link Observer#onCompleted onCompleted} method.
557
+ * @param <T>
558
+ * the type of the items (ostensibly) emitted by the Observable
559
+ * @return an Observable that returns no data to the {@link Observer} and immediately invokes
560
+ * the {@link Observer}'s {@link Observer#onCompleted() onCompleted} method with
561
+ * the specified scheduler.
562
+ */
563
+ public static <T > Observable <T > empty (Scheduler scheduler ) {
564
+ return Observable .<T >empty ().subscribeOn (scheduler );
565
+ }
566
+
550
567
/**
551
568
* Returns an Observable that invokes an {@link Observer}'s {@link Observer#onError onError} method when the Observer subscribes to it
552
569
* <p>
You can’t perform that action at this time.
0 commit comments