code: public static <T> List<T> sorted(Iterable<T> items, Comparator<T> comparator) {
      List<T> result = toList(items);
      Collections.sort(result, comparator);
      return result;
    }
docs: Return the items of an Iterable as a sorted list.
  
  @param <T>
  The type of items in the Iterable.
  @param items
  The collection to be sorted.
  @return A list containing the same items as the Iterable, but sorted.