title: How can I stream a Map<String, List<Object>> into a Stream<Entry<String, Object>>?
body: <p>I have a <code>Map&lt;String, List&lt;Object&gt;&gt;</code>.</p>
  
  <p>How can I make it into a Stream of <code>Entry&lt;String, Object&gt;</code> so that I can construct a concatenated query <code>String</code>?</p>
  
  <pre><code>q1    a, b
  q2    c, d
  </code></pre>
  
  <p>into</p>
  
  <pre><code>q1=a&amp;q1=b&amp;q2=c&amp;q2=d
  </code></pre>
  
  <p>I'm, currently, doing this.</p>
  
  <pre><code>if (params != null &amp;&amp; !params.isEmpty()) {
      final boolean[] flag = new boolean[1];
      params.forEach((n, vs) -&gt; {
          vs.forEach(v -&gt; {
              builder.append(flag[0] ? '&amp;' : '?')
                      .append(n)
                      .append('=')
                      .append(v);
              if (!flag[0]) {
                  flag[0] = true;
              }
          });
      });
  }
  </code></pre>