title: How to remove an element of a HashMap whilst streaming (lambda)
body: <p>I have the following situation where I need to remove an element from a stream. </p>
  
  <pre><code>map.entrySet().stream().filter(t -&gt; t.getValue().equals("0")).
              forEach(t -&gt; map.remove(t.getKey()));
  </code></pre>
  
  <p>in pre Java 8 code one would remove from the iterator - what's the best way to deal with this situation here?</p>