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