Skip to content

Commit 396f2f6

Browse files
UMFsimkeakarnokd
authored andcommitted
Add marbles for Single.from operators (#6087)
1 parent 97ebd2c commit 396f2f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/io/reactivex/Single.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ public static <T> Single<T> error(final Throwable exception) {
554554
* Allows you to defer execution of passed function until SingleObserver subscribes to the {@link Single}.
555555
* It makes passed function "lazy".
556556
* Result of the function invocation will be emitted by the {@link Single}.
557+
* <p>
558+
* <img width="640" height="467" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.fromCallable.png" alt="">
557559
* <dl>
558560
* <dt><b>Scheduler:</b></dt>
559561
* <dd>{@code fromCallable} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -714,6 +716,8 @@ public static <T> Single<T> fromFuture(Future<? extends T> future, Scheduler sch
714716
* Note that even though {@link Publisher} appears to be a functional interface, it
715717
* is not recommended to implement it through a lambda as the specification requires
716718
* state management that is not achievable with a stateless lambda.
719+
* <p>
720+
* <img width="640" height="322" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.fromPublisher.png" alt="">
717721
* <dl>
718722
* <dt><b>Backpressure:</b></dt>
719723
* <dd>The {@code publisher} is consumed in an unbounded fashion but will be cancelled
@@ -738,6 +742,8 @@ public static <T> Single<T> fromPublisher(final Publisher<? extends T> publisher
738742
* Wraps a specific ObservableSource into a Single and signals its single element or error.
739743
* <p>If the ObservableSource is empty, a NoSuchElementException is signalled.
740744
* If the source has more than one element, an IndexOutOfBoundsException is signalled.
745+
* <p>
746+
* <img width="640" height="343" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.fromObservable.png" alt="">
741747
* <dl>
742748
* <dt><b>Scheduler:</b></dt>
743749
* <dd>{@code fromObservable} does not operate by default on a particular {@link Scheduler}.</dd>

0 commit comments

Comments
 (0)