code: public static <M extends Map<K, V>, K, V> M dict(Iterator<Pair<K, V>> iterator, Supplier<M> supplier) {
          final Function<Iterator<Pair<K, V>>, M> consumer = new ConsumeIntoMap<>(supplier);
          return consumer.apply(iterator);
      }
docs: Yields all elements of the iterator (in a map created by the supplier).
  
  @param <M> the returned map type
  @param <K> the map key type
  @param <V> the map value type
  @param iterator the iterator that will be consumed
  @param supplier the factory used to get the returned map
  @return a map filled with iterator values