public static <E, K, V> MapStream<K, V> fromStream(Stream<E> stream, Function<E, K> keyMapper, Function<E, V> valueMapper) {
        requireNonNull(stream);
        requireNonNull(keyMapper);
        requireNonNull(valueMapper);
        return new MapStream<>(stream.map(
            e -> new AbstractMap.SimpleEntry<>(
                keyMapper.apply(e),
                valueMapper.apply(e)
            )
        ));
    }
Constructs a new {@code MapStream} by wrapping a stream of objects and 
calculating both keys and values using the supplied functions.

@param <E>          original stream type
@param <K>          key type
@param <V>          value type
@param stream       original stream
@param keyMapper    method for calculating keys
@param valueMapper  method for calculating values
@return             created {@code MapStream}
@throws NullPointerException if any of the provided parameters are {@code null}
common-parent/mapstream/src/main/java/com/speedment/common/mapstream/MapStream.java