src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<List<T>> toSortedList() {
        return toSortedList(Functions.naturalOrder());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<List<T>> toSortedList() {
        return toSortedList(Functions.naturalOrder());
    }
Returns a Single that emits a list that contains the items emitted by the finite source ObservableSource, in a
sorted order. Each item emitted by the ObservableSource must implement {@link Comparable} with respect to all
other items in the sequence.

<p>If any item emitted by this Observable does not implement {@link Comparable} with respect to
all other items emitted by this Observable, no items will be emitted and the
sequence is terminated with a {@link ClassCastException}.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toSortedList.2.png" alt="">
<p>
Note that this operator requires the upstream to signal {@code onComplete} for the accumulated list to
be emitted. Sources that are infinite and never complete will never emit anything through this
operator and an infinite source may lead to a fatal {@code OutOfMemoryError}.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code toSortedList} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
@return a Single that emits a list that contains the items emitted by the source ObservableSource in
sorted order
@see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX operators documentation: To</a>