code: public final List<T> toSortedList(final Comparator<? super T> comparator) {
          return Ordering.from(comparator).immutableSortedCopy(
                  toCollection(Lists.<T>newArrayListWithCapacity(256)));
      }
docs: Terminal operation returning an immutable List with all the elements of this Stream, sorted
  using the supplied Comparator. Use {@link Ordering#natural()} to sort Comparable elements
  based on {@link Comparable#compareTo(Object)} order. Call this method only if there is
  enough memory to hold the resulting List.
  
  @param comparator
  the Comparator to sort elements, not null
  @return the resulting immutable sorted list