File tree 2 files changed +12
-10
lines changed
src/main/java/io/reactivex
2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -5842,15 +5842,16 @@ public final T blockingSingle(T defaultItem) {
5842
5842
}
5843
5843
5844
5844
/**
5845
- * Returns a {@link Future} representing the single value emitted by this {@code Flowable}.
5845
+ * Returns a {@link Future} representing the only value emitted by this {@code Flowable}.
5846
+ * <p>
5847
+ * <img width="640" height="324" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/Flowable.toFuture.png" alt="">
5846
5848
* <p>
5847
5849
* If the {@link Flowable} emits more than one item, {@link java.util.concurrent.Future} will receive an
5848
- * {@link java.lang.IllegalArgumentException}. If the {@link Flowable} is empty, {@link java.util.concurrent.Future}
5849
- * will receive a {@link java.util.NoSuchElementException}.
5850
+ * {@link java.lang.IndexOutOfBoundsException}. If the {@link Flowable} is empty, {@link java.util.concurrent.Future}
5851
+ * will receive a {@link java.util.NoSuchElementException}. The {@code Flowable} source has to terminate in order
5852
+ * for the returned {@code Future} to terminate as well.
5850
5853
* <p>
5851
5854
* If the {@code Flowable} may emit more than one item, use {@code Flowable.toList().toFuture()}.
5852
- * <p>
5853
- * <img width="640" height="395" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/B.toFuture.png" alt="">
5854
5855
* <dl>
5855
5856
* <dt><b>Backpressure:</b></dt>
5856
5857
* <dd>The operator consumes the source {@code Flowable} in an unbounded manner
Original file line number Diff line number Diff line change @@ -5340,15 +5340,16 @@ public final T blockingSingle(T defaultItem) {
5340
5340
}
5341
5341
5342
5342
/**
5343
- * Returns a {@link Future} representing the single value emitted by this {@code Observable}.
5343
+ * Returns a {@link Future} representing the only value emitted by this {@code Observable}.
5344
+ * <p>
5345
+ * <img width="640" height="312" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/toFuture.o.png" alt="">
5344
5346
* <p>
5345
5347
* If the {@link Observable} emits more than one item, {@link java.util.concurrent.Future} will receive an
5346
- * {@link java.lang.IllegalArgumentException}. If the {@link Observable} is empty, {@link java.util.concurrent.Future}
5347
- * will receive an {@link java.util.NoSuchElementException}.
5348
+ * {@link java.lang.IndexOutOfBoundsException}. If the {@link Observable} is empty, {@link java.util.concurrent.Future}
5349
+ * will receive an {@link java.util.NoSuchElementException}. The {@code Observable} source has to terminate in order
5350
+ * for the returned {@code Future} to terminate as well.
5348
5351
* <p>
5349
5352
* If the {@code Observable} may emit more than one item, use {@code Observable.toList().toFuture()}.
5350
- * <p>
5351
- * <img width="640" height="389" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/toFuture.o.png" alt="">
5352
5353
* <dl>
5353
5354
* <dt><b>Scheduler:</b></dt>
5354
5355
* <dd>{@code toFuture} does not operate by default on a particular {@link Scheduler}.</dd>
You can’t perform that action at this time.
0 commit comments