com.kobylynskyi.graphql.codegen.extension.utils.JavaCollectionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-codegen Show documentation
Show all versions of graphql-java-codegen Show documentation
Java Code Generator based on GraphQL schema
The newest version!
package com.kobylynskyi.graphql.codegen.extension.utils;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author [email protected]
* @version 1.0, 2020/10/22
*/
final public class JavaCollectionUtils {
private JavaCollectionUtils() {
}
public static Map listToMap(final List keys, final List values) {
return keys.stream().collect(Collectors.toMap(k -> k, k -> values.get(keys.indexOf(k))));
}
}