public <R> MapStream<R, V> flatMapKey(BiFunction<? super K, ? super V, ? extends Stream<? extends R>> mapper) {
        requireNonNull(mapper);
        return new MapStream<>(inner.flatMap(e
            -> mapper.apply(e.getKey(), e.getValue())
            .map(k
                -> new AbstractMap.SimpleEntry<>(
                    k,
                    e.getValue()
                )
            )
        ));
    }
Returns a stream where the key-component of this stream has been replaced 
by the result of applying the specified mapping function to the entry.
Each mapped stream is {@link java.util.stream.BaseStream#close() closed} 
after its contents have been placed into this stream. (If a mapped stream 
is {@code null} an empty stream is used, instead.)
<p>
This is an intermediate operation.

<p>
The {@code flatMap()} operation has the effect of applying a one-to-many
transformation to the elements of the stream, and then flattening the
resulting elements into a new stream.

@param <R>     the element type of the new stream
@param mapper  a non-interfering, stateless function to apply to each 
               key-value pair which produces a stream of new keys
@return        the new stream
@throws NullPointerException if any of the provided parameters are {@code null}
common-parent/mapstream/src/main/java/com/speedment/common/mapstream/MapStream.java