public static <S,K,V,M extends Map<K,V>>Collector<S,?,M> toMap(Function<? super S,? extends K> keyMapper,Function<? super S,? extends V> valueMapper,Supplier<M> mapSupplier){
  return Collectors.toMap(keyMapper,valueMapper,StreamUtils.throwingMerger(),mapSupplier);
}

public static < S , K , V , M extends Map < K , V > > Collector < S , ? , M > toMap ( Function < ? super S , ? extends K > keyMapper , Function < ? super S , ? extends V > valueMapper , Supplier < M > mapSupplier ) { return Collectors . toMap ( keyMapper , valueMapper , StreamUtils . throwingMerger ( ) , mapSupplier ) ; }
return a collector that creates a linkedhashmap using the given key and value functions . this collector assumes the elements being collected are distinct .
