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 @@ -1014,6 +1014,23 @@ public static <T> Observable<T> just(T value) {
1014
1014
return from (list );
1015
1015
}
1016
1016
1017
+ /**
1018
+ * Returns an Observable that emits a single item and then completes on a specified scheduler.
1019
+ * <p>
1020
+ * This is a scheduler version of {@link Observable#just(Object)}.
1021
+ *
1022
+ * @param value
1023
+ * the item to pass to the {@link Observer}'s {@link Observer#onNext onNext} method
1024
+ * @param scheduler
1025
+ * the scheduler to send the single element on
1026
+ * @param <T>
1027
+ * the type of that item
1028
+ * @return an Observable that emits a single item and then completes on a specified scheduler.
1029
+ */
1030
+ public static <T > Observable <T > just (T value , Scheduler scheduler ) {
1031
+ return just (value ).observeOn (scheduler );
1032
+ }
1033
+
1017
1034
/**
1018
1035
* Flattens a sequence of Observables emitted by an Observable into one Observable, without any
1019
1036
* transformation.
You can’t perform that action at this time.
0 commit comments