code: public static <E> ImmutableList<E> copyOf(Iterator<? extends E> elements) {
      // We special-case for 0 or 1 elements, but going further is madness.
      if (!elements.hasNext()) {
        return of();
      }
      E first = elements.next();
      if (!elements.hasNext()) {
        return of(first);
      } else {
        return new ImmutableList.Builder<E>().add(first).addAll(elements).build();
      }
    }
docs: Returns an immutable list containing the given elements, in order.
  
  @throws NullPointerException if any of {@code elements} is null