code: @CheckReturnValue
      @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
      @SchedulerSupport(SchedulerSupport.NONE)
      public final Single<List<T>> toSortedList(final Comparator<? super T> comparator) {
          ObjectHelper.requireNonNull(comparator, "comparator is null");
          return toList().map(Functions.listSorter(comparator));
      }
docs: Returns a Single that emits a list that contains the items emitted by the finite source Publisher, in a
  sorted order based on a specified comparison function.
  <p>
  <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toSortedList.f.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>Backpressure:</b></dt>
  <dd>The operator honors backpressure from downstream and consumes the source {@code Publisher} in an
  unbounded manner (i.e., without applying backpressure to it).</dd>
  <dt><b>Scheduler:</b></dt>
  <dd>{@code toSortedList} does not operate by default on a particular {@link Scheduler}.</dd>
  </dl>
  
  @param comparator
  a function that compares two items emitted by the source Publisher and returns an Integer
  that indicates their sort order
  @return a Single that emits a list that contains the items emitted by the source Publisher in
  sorted order
  @see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX operators documentation: To</a>