public Map<K, V> toMap(BinaryOperator<V> mergeFunction) {
        requireNonNull(mergeFunction);
        return inner.collect(Collectors.toMap(
            Map.Entry::getKey,
            Map.Entry::getValue,
            mergeFunction
        ));
    }
Accumulates all key-value pairs of this {@code MapStream} into a {@code Map}.
<p>
If the mapped keys contains duplicates (according to 
{@link Object#equals(Object)}), the values are merged using the provided 
merging function.

<p>
There are multiple ways to deal with collisions between multiple elements
mapping to the same key.  The other forms of {@code toMap} simply use
a merge function that throws unconditionally, but you can easily write
more flexible merge policies.

<p>
The returned {@code Map} is not concurrent. For parallel stream
pipelines, the {@code combiner} function operates by merging the keys
from one map into another, which can be an expensive operation. If it is
not required that results are merged into the {@code Map} in encounter
order, using {@link #toConcurrentMap(BinaryOperator)}
may offer better parallel performance.

@param mergeFunction  a merge function, used to resolve collisions 
                      between values associated with the same key, as 
                      supplied to {@link Map#merge(Object, Object, BiFunction)}
@return               a {@code Map} whose keys and values are identical 
                      to the entries of this stream with any collisions 
                      handled
@throws NullPointerException if any of the provided parameters are {@code null}

@see #toMap()
@see #toConcurrentMap(BinaryOperator)
common-parent/mapstream/src/main/java/com/speedment/common/mapstream/MapStream.java