code: public static <E, R extends Collection<E>> R all(Iterable<E> iterable, Supplier<R> supplier) {
          dbc.precondition(iterable != null, "cannot call all with a null iterable");
          final Function<Iterator<E>, R> consumer = new ConsumeIntoCollection<>(supplier);
          return consumer.apply(iterable.iterator());
      }
docs: Yields all elements of the iterator (in a collection created by the
  supplier).
  
  @param <R> the returned collection type
  @param <E> the collection element type
  @param iterable the iterable that will be consumed
  @param supplier the factory used to get the returned collection
  @return a collection filled with iterator values