Let
List<String> data = Arrays.asList("key1=value1", "key2=value2");
Is there a way in Java using the stream api to convert this to a HashMap?
i.e. {{key1 -> value1}, {key2 -> value2}}
HashMap<String, String> dataMap = data.stream().map(s -> s.split("=")).//some stuff here//.collect(//some stuff here//);