Is there a nice way to convert/transform a list of Strings (with Collectos API?) into a HashMap?
StringList and Map:
List<String> entries = new ArrayList<>(); HashMap<String, String> map = new HashMap<>(); ...
My StringList contains Strings like:
entries.add("id1"); entries.add("name1, district"); entries.add("id2"); entries.add("name2, city"); entries.add("id3"); entries.add("name3"); Output should be:
{id1=name1, district, id2=name2, city, id3=name3} Thank you!