code: public static <K, V, E> Map<K, V> collectEntries(Iterator<E> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<?> transform) {
          return collectEntries(self, new LinkedHashMap<K, V>(), transform);
      }
docs: A variant of collectEntries for Iterators.
  
  @param self      an Iterator
  @param transform the closure used for transforming, which has an item from self as the parameter and
  should return a Map.Entry, a Map or a two-element list containing the resulting key and value
  @return a Map of the transformed entries
  @see #collectEntries(Iterable, Closure)
  @since 1.8.7