public static <K, V> MapStream<K, V> fromValues(Stream<V> values, Function<V, K> keyFromValue) {
        requireNonNull(values);
        requireNonNull(keyFromValue);
        return new MapStream<>(values.map(v -> new AbstractMap.SimpleEntry<>(keyFromValue.apply(v), v)));
    }
Constructs a new {@code MapStream} by wrapping a value-stream and 
calculating the corresponding keys using the supplied function.

@param <K>           key type
@param <V>           value type
@param values        stream of values to wrap
@param keyFromValue  method for calculating keys from 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