code: @NotNull
      public static <T, K> Collector<T, ?, Map<K, T>> toMap(
              @NotNull final Function<? super T, ? extends K> keyMapper) {
          return Collectors.<T, K, T>toMap(keyMapper, UnaryOperator.Util.<T>identity());
      }
docs: Returns a {@code Collector} that fills new {@code Map} with input elements.
  
  If the mapped keys contain duplicates, an {@code IllegalStateException} is thrown.
  Use {@link #toMap(Function, Function, BinaryOperator)} to handle merging of the values.
  
  @param <T> the type of the input elements and the result type of value mapping function
  @param <K> the result type of key mapping function
  @param keyMapper  a mapping function to produce keys
  @return a {@code Collector}
  @since 1.1.3
  @see #toMap(Function, Function, BinaryOperator)