title: How to filter a map by its values in Java 8?
body: <p>I have a map where the values are strings and the keys are lists: <code>Map&lt;String, List&lt;BoMLine&gt;&gt; materials</code>.
  I'd like to filter this map by its values; something like this:</p>
  <pre><code>materials.entrySet().stream()
         .filter(a-&gt;a.getValue().stream()
             .filter(l-&gt;MaterialDao.findMaterialByName(l.getMaterial()).ispresent)
  </code></pre>
  <p>But it's not working for me. Does anybody have an idea?</p>