code: public static <T> List<T> toList(Stream<T> stream) {
          return stream.collect(Collectors.<T>toList());
      }
docs: Accumulates the elements of stream into a new List.
  @param stream the Stream
  @param <T> the type of element
  @return a new {@code java.util.List} instance