code: public static <T extends Comparable<? super T>> Collector<T, ?, List<T>> least(int n) {
          return least(Comparator.<T> naturalOrder(), n);
      }
docs: Returns a {@code Collector} which collects at most specified number of
  the least stream elements according to the natural order into the
  {@link List}. The resulting {@code List} is sorted in natural order
  (least element is the first). The order of equal elements is the same as
  in the input stream.
  
  <p>
  The operation performed by the returned collector is equivalent to
  {@code stream.sorted().limit(n).collect(Collectors.toList())}, but
  usually performed much faster if {@code n} is much less than the stream
  size.
  
  <p>
  There are no guarantees on the type, mutability, serializability, or
  thread-safety of the {@code List} returned.
  
  <p>
  When supplied {@code n} is less or equal to zero, this method returns a
  <a href="package-summary.html#ShortCircuitReduction">short-circuiting
  collector</a> which ignores the input and produces an empty list.
  
  @param <T> the type of the input elements
  @param n maximum number of stream elements to preserve
  @return a collector which returns a {@code List} containing the least n
  stream elements or less if the stream was shorter.