@@ -7718,8 +7718,8 @@ public final Flowable<T> doOnTerminate(final Action onTerminate) {
7718
7718
}
7719
7719
7720
7720
/**
7721
- * Returns a Maybe that emits the single item at a specified index in a sequence of emissions from a
7722
- * source Publisher .
7721
+ * Returns a Maybe that emits the single item at a specified index in a sequence of emissions from
7722
+ * this Flowable or completes if this Flowable sequence has fewer elements than index .
7723
7723
* <p>
7724
7724
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/elementAt.png" alt="">
7725
7725
* <dl>
@@ -7746,8 +7746,8 @@ public final Maybe<T> elementAt(long index) {
7746
7746
}
7747
7747
7748
7748
/**
7749
- * Returns a Flowable that emits the item found at a specified index in a sequence of emissions from a
7750
- * source Publisher , or a default item if that index is out of range.
7749
+ * Returns a Flowable that emits the item found at a specified index in a sequence of emissions from
7750
+ * this Flowable , or a default item if that index is out of range.
7751
7751
* <p>
7752
7752
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/elementAtOrDefault.png" alt="">
7753
7753
* <dl>
@@ -7779,9 +7779,8 @@ public final Single<T> elementAt(long index, T defaultItem) {
7779
7779
}
7780
7780
7781
7781
/**
7782
- * Returns a Flowable that emits the item found at a specified index in a sequence of emissions from a
7783
- * source Publisher.
7784
- * If the source Publisher does not contain the item at the specified index a {@link NoSuchElementException} will be thrown.
7782
+ * Returns a Flowable that emits the item found at a specified index in a sequence of emissions from
7783
+ * this Flowable or signals a {@link NoSuchElementException} if this Flowable has fewer elements than index.
7785
7784
* <p>
7786
7785
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/elementAtOrDefault.png" alt="">
7787
7786
* <dl>
@@ -7836,8 +7835,8 @@ public final Flowable<T> filter(Predicate<? super T> predicate) {
7836
7835
}
7837
7836
7838
7837
/**
7839
- * Returns a Maybe that emits only the very first item emitted by the source Publisher, or notifies
7840
- * of an {@code NoSuchElementException} if the source Publisher is empty.
7838
+ * Returns a Maybe that emits only the very first item emitted by this Flowable or
7839
+ * completes if this Flowable is empty.
7841
7840
* <p>
7842
7841
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/first.png" alt="">
7843
7842
* <dl>
@@ -7848,8 +7847,7 @@ public final Flowable<T> filter(Predicate<? super T> predicate) {
7848
7847
* <dd>{@code firstElement} does not operate by default on a particular {@link Scheduler}.</dd>
7849
7848
* </dl>
7850
7849
*
7851
- * @return a Maybe that emits only the very first item emitted by the source Publisher, or raises an
7852
- * {@code NoSuchElementException} if the source Publisher is empty
7850
+ * @return the new Maybe instance
7853
7851
* @see <a href="http://reactivex.io/documentation/operators/first.html">ReactiveX operators documentation: First</a>
7854
7852
*/
7855
7853
@BackpressureSupport(BackpressureKind.SPECIAL) // take may trigger UNBOUNDED_IN
@@ -7859,8 +7857,8 @@ public final Maybe<T> firstElement() {
7859
7857
}
7860
7858
7861
7859
/**
7862
- * Returns a Single that emits only the very first item emitted by the source Publisher , or a default
7863
- * item if the source Publisher completes without emitting anything.
7860
+ * Returns a Single that emits only the very first item emitted by this Flowable , or a default
7861
+ * item if this Flowable completes without emitting anything.
7864
7862
* <p>
7865
7863
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/firstOrDefault.png" alt="">
7866
7864
* <dl>
@@ -7884,9 +7882,8 @@ public final Single<T> first(T defaultItem) {
7884
7882
}
7885
7883
7886
7884
/**
7887
- * Returns a Single that emits only the very first item emitted by the source Publisher, or a default
7888
- * item if the source Publisher completes without emitting anything.
7889
- * If the source Publisher completes without emitting any items a {@link NoSuchElementException} will be thrown.
7885
+ * Returns a Single that emits only the very first item emitted by this Flowable or
7886
+ * signals a {@link NoSuchElementException} if this Flowable is empty.
7890
7887
* <p>
7891
7888
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/firstOrError.png" alt="">
7892
7889
* <dl>
@@ -8655,8 +8652,6 @@ public final <R> Flowable<R> flatMapSingle(Function<? super T, ? extends SingleS
8655
8652
* a Disposable that allows cancelling an asynchronous sequence
8656
8653
* @throws NullPointerException
8657
8654
* if {@code onNext} is null
8658
- * @throws RuntimeException
8659
- * if the Publisher calls {@code onError}
8660
8655
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
8661
8656
*/
8662
8657
@BackpressureSupport(BackpressureKind.NONE)
@@ -8682,8 +8677,6 @@ public final Disposable forEach(Consumer<? super T> onNext) {
8682
8677
* a {@link Disposable} that allows cancelling an asynchronous sequence
8683
8678
* @throws NullPointerException
8684
8679
* if {@code onNext} is null
8685
- * @throws RuntimeException
8686
- * if the Publisher calls {@code onError}
8687
8680
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
8688
8681
*/
8689
8682
@BackpressureSupport(BackpressureKind.NONE)
@@ -9144,7 +9137,8 @@ public final <TRight, TLeftEnd, TRightEnd, R> Flowable<R> join(
9144
9137
9145
9138
9146
9139
/**
9147
- * Returns a Maybe that emits the last item emitted by the source Publisher or completes if the source Publisher is empty.
9140
+ * Returns a Maybe that emits the last item emitted by this Flowable or completes if
9141
+ * this Flowable is empty.
9148
9142
* <p>
9149
9143
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/last.png" alt="">
9150
9144
* <dl>
@@ -9165,8 +9159,8 @@ public final Maybe<T> lastElement() {
9165
9159
}
9166
9160
9167
9161
/**
9168
- * Returns a Single that emits only the last item emitted by the source Publisher , or a default item
9169
- * if the source Publisher completes without emitting any items.
9162
+ * Returns a Single that emits only the last item emitted by this Flowable , or a default item
9163
+ * if this Flowable completes without emitting any items.
9170
9164
* <p>
9171
9165
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/lastOrDefault.png" alt="">
9172
9166
* <dl>
@@ -9179,8 +9173,7 @@ public final Maybe<T> lastElement() {
9179
9173
*
9180
9174
* @param defaultItem
9181
9175
* the default item to emit if the source Publisher is empty
9182
- * @return a Single that emits only the last item emitted by the source Publisher, or a default item
9183
- * if the source Publisher is empty
9176
+ * @return the new Single instance
9184
9177
* @see <a href="http://reactivex.io/documentation/operators/last.html">ReactiveX operators documentation: Last</a>
9185
9178
*/
9186
9179
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@@ -9191,8 +9184,8 @@ public final Single<T> last(T defaultItem) {
9191
9184
}
9192
9185
9193
9186
/**
9194
- * Returns a Single that emits only the last item emitted by the source Publisher.
9195
- * If the source Publisher completes without emitting any items a {@link NoSuchElementException} will be thrown .
9187
+ * Returns a Single that emits only the last item emitted by this Flowable or signals
9188
+ * a {@link NoSuchElementException} if this Flowable is empty .
9196
9189
* <p>
9197
9190
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/lastOrError.png" alt="">
9198
9191
* <dl>
@@ -11470,9 +11463,9 @@ public final Flowable<T> share() {
11470
11463
}
11471
11464
11472
11465
/**
11473
- * Returns a Maybe that emits the single item emitted by the source Publisher, if that Publisher
11474
- * emits only a single item. If the source Publisher emits more than one item, notify of an
11475
- * {@code IllegalArgumentException} .
11466
+ * Returns a Maybe that completes if this Flowable is empty, signals one item if this Flowable
11467
+ * signals exactly one item or signals an {@code IllegalArgumentException} if this Flowable signals
11468
+ * more than one item .
11476
11469
* <p>
11477
11470
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/single.png" alt="">
11478
11471
* <dl>
@@ -11484,8 +11477,6 @@ public final Flowable<T> share() {
11484
11477
* </dl>
11485
11478
*
11486
11479
* @return a Maybe that emits the single item emitted by the source Publisher
11487
- * @throws IllegalArgumentException
11488
- * if the source emits more than one item
11489
11480
* @see <a href="http://reactivex.io/documentation/operators/first.html">ReactiveX operators documentation: First</a>
11490
11481
*/
11491
11482
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@@ -11497,7 +11488,7 @@ public final Maybe<T> singleElement() {
11497
11488
/**
11498
11489
* Returns a Single that emits the single item emitted by the source Publisher, if that Publisher
11499
11490
* emits only a single item, or a default item if the source Publisher emits no items. If the source
11500
- * Publisher emits more than one item, throw an {@code IllegalArgumentException}.
11491
+ * Publisher emits more than one item, an {@code IllegalArgumentException} is signalled instead .
11501
11492
* <p>
11502
11493
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/singleOrDefault.png" alt="">
11503
11494
* <dl>
@@ -11522,10 +11513,10 @@ public final Single<T> single(T defaultItem) {
11522
11513
}
11523
11514
11524
11515
/**
11525
- * Returns a Single that emits the single item emitted by the source Publisher , if that Publisher
11526
- * emits only a single item.
11527
- * If the source Publisher completes without emitting any items a {@link NoSuchElementException} will be thrown.
11528
- * If the source Publisher emits more than one item, throw an {@code IllegalArgumentException}.
11516
+ * Returns a Single that emits the single item emitted by this Flowable , if this Flowable
11517
+ * emits only a single item, otherwise
11518
+ * if this Flowable completes without emitting any items a {@link NoSuchElementException} will be signalled and
11519
+ * if this Flowable emits more than one item, an {@code IllegalArgumentException} will be signalled .
11529
11520
* <p>
11530
11521
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/singleOrError.png" alt="">
11531
11522
* <dl>
@@ -11894,6 +11885,9 @@ public final Flowable<T> skipWhile(Predicate<? super T> predicate) {
11894
11885
* sorted order. Each item emitted by the Publisher must implement {@link Comparable} with respect to all
11895
11886
* other items in the sequence.
11896
11887
*
11888
+ * <p>If any item emitted by this Flowable does not implement {@link Comparable} with respect to
11889
+ * all other items emitted by this Flowable, no items will be emitted and the
11890
+ * sequence is terminated with a {@link ClassCastException}.
11897
11891
* <p>Note that calling {@code sorted} with long, non-terminating or infinite sources
11898
11892
* might cause {@link OutOfMemoryError}
11899
11893
*
@@ -11905,9 +11899,6 @@ public final Flowable<T> skipWhile(Predicate<? super T> predicate) {
11905
11899
* <dd>{@code sorted} does not operate by default on a particular {@link Scheduler}.</dd>
11906
11900
* </dl>
11907
11901
*
11908
- * @throws ClassCastException
11909
- * if any item emitted by the Publisher does not implement {@link Comparable} with respect to
11910
- * all other items emitted by the Publisher
11911
11902
* @return a Flowable that emits the items emitted by the source Publisher in sorted order
11912
11903
*/
11913
11904
@BackpressureSupport(BackpressureKind.FULL)
@@ -14079,6 +14070,10 @@ public final Observable<T> toObservable() {
14079
14070
* Returns a Single that emits a list that contains the items emitted by the source Publisher, in a
14080
14071
* sorted order. Each item emitted by the Publisher must implement {@link Comparable} with respect to all
14081
14072
* other items in the sequence.
14073
+ *
14074
+ * <p>If any item emitted by this Flowable does not implement {@link Comparable} with respect to
14075
+ * all other items emitted by this Flowable, no items will be emitted and the
14076
+ * sequence is terminated with a {@link ClassCastException}.
14082
14077
* <p>
14083
14078
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toSortedList.png" alt="">
14084
14079
* <dl>
@@ -14088,10 +14083,6 @@ public final Observable<T> toObservable() {
14088
14083
* <dt><b>Scheduler:</b></dt>
14089
14084
* <dd>{@code toSortedList} does not operate by default on a particular {@link Scheduler}.</dd>
14090
14085
* </dl>
14091
- *
14092
- * @throws ClassCastException
14093
- * if any item emitted by the Publisher does not implement {@link Comparable} with respect to
14094
- * all other items emitted by the Publisher
14095
14086
* @return a Single that emits a list that contains the items emitted by the source Publisher in
14096
14087
* sorted order
14097
14088
* @see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX operators documentation: To</a>
@@ -14163,6 +14154,10 @@ public final Single<List<T>> toSortedList(final Comparator<? super T> comparator
14163
14154
* Returns a Flowable that emits a list that contains the items emitted by the source Publisher, in a
14164
14155
* sorted order. Each item emitted by the Publisher must implement {@link Comparable} with respect to all
14165
14156
* other items in the sequence.
14157
+ *
14158
+ * <p>If any item emitted by this Flowable does not implement {@link Comparable} with respect to
14159
+ * all other items emitted by this Flowable, no items will be emitted and the
14160
+ * sequence is terminated with a {@link ClassCastException}.
14166
14161
* <p>
14167
14162
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toSortedList.png" alt="">
14168
14163
* <dl>
@@ -14177,9 +14172,6 @@ public final Single<List<T>> toSortedList(final Comparator<? super T> comparator
14177
14172
* the initial capacity of the ArrayList used to accumulate items before sorting
14178
14173
* @return a Flowable that emits a list that contains the items emitted by the source Publisher in
14179
14174
* sorted order
14180
- * @throws ClassCastException
14181
- * if any item emitted by the Publisher does not implement {@link Comparable} with respect to
14182
- * all other items emitted by the Publisher
14183
14175
* @see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX operators documentation: To</a>
14184
14176
* @since 2.0
14185
14177
*/
0 commit comments