Returns an Observable that signals the given (constant reference) item and then completes. Note that the item is taken and re-emitted as is and not computed by a
(@NonNull T item)
| 2643 | * @see #fromIterable(Iterable) |
| 2644 | */ |
| 2645 | @CheckReturnValue |
| 2646 | @NonNull |
| 2647 | @SchedulerSupport(SchedulerSupport.NONE) |
| 2648 | public static <@NonNull T> Observable<T> just(@NonNull T item) { |
| 2649 | Objects.requireNonNull(item, "item is null"); |
| 2650 | return RxJavaPlugins.onAssembly(new ObservableJust<>(item)); |
| 2651 | } |
| 2652 | |
| 2653 | /** |
| 2654 | * Converts two items into an {@code Observable} that emits those items. |