Java 8 | Parallel Stream for a HashMap
<p>In java 8 I know that they added the parallel stream which takes advantage of multicore processors, and I know that you can use it with something like this:</p>

<pre><code>List&lt;String&gt; list = new ArrayList&lt;String&gt;();
list.parallelStream().forEach(str -&gt; System.out.println(str));
</code></pre>

<p>But how would I achieve something like this with a HashMap?</p>

<pre><code>Map&lt;String, Integer&gt; map = new HashMap&lt;String, Integer&gt;();
// won't work, because the Map class doesn't have the .parallelStream()
map.parallelStream().forEach((str, num) -&gt; System.out.println(str + ":" + num));
</code></pre>

<p>Does anyone know how to do something like this? Thanks</p>