code: public static <E> List<E> all(Iterator<E> iterator) {
          final Function<Iterator<E>, ArrayList<E>> consumer = new ConsumeIntoCollection<>(new ArrayListFactory<E>());
          return consumer.apply(iterator);
      }
docs: yields all elements of the iterator (in a list).
  
  @param <E> the iterator element type
  @param iterator the iterator that will be consumed
  @return a list filled with iterator values