code: public static <T> Collector<T, List<T>> toList() {
      return new Collector<T, List<T>>() {
        @Override
        public List<T> collect(Stream<? extends T> stream) {
          return Lists.newArrayList(stream.iterator());
        }
      };
    }
docs: Collect to array list.
  @param <T> Streaming type
  @return Array list