title: Java lambda expression: How to concatenate key and set of values from a hashmap?
body: <p>I am new to lambda expressions and currently I am stuck with a task I'd like to solve (just for the sake of learning lambdas).</p>
  <p>Given is a map <code>Map&lt;String, Set&lt;Integer&gt;&gt;</code> and I want to iterate over the entry sets concatenating the keys and their values as String.</p>
  <p>The map could look like this:</p>
  <blockquote>
  <p>&quot;x&quot;, [1,3,5]</p>
  <p>&quot;y&quot;, [2,3]</p>
  <p>&quot;z&quot;, [2,4]</p>
  </blockquote>
  <p>And I want to end up with this String representation:</p>
  <blockquote>
  <p>&quot;x: 1, 3, 5; y: 2, 3; z: 2, 4&quot;</p>
  </blockquote>
  <p>I am not even sure where to start here. All the examples that can be found on the internet do either just loop a list or a map with single values (instead of a set) and most of the time all they do is <code>System.out.println()</code>. I can't even figure out how to start... forEach or stream? I guess I need one (or more?) collector(s) that can join the values but I just do not understand how to achieve this. Is this even possible in one expression?</p>
  <p>Can somebody give me a hint?</p>