docs: public static <K, V, E> Map<K, V> collectEntries(Iterator<E> self, Map<K, V> collector, @ClosureParams(FirstParam.FirstGenericType.class) Closure<?> transform) {
          while (self.hasNext()) {
              E next = self.next();
              addEntry(collector, transform.call(next));
          }
          return collector;
      }