title: Filtering a stream of pojos using values from a map
body: <p>I have this pojo (This is an example of the case, not the real one):</p>
  
  <pre><code>Book {
    String name;
    Map&lt;String, String&gt; properties;
  }
  </code></pre>
  
  <p>and a list of them:</p>
  
  <pre><code>List&lt;Book&gt; library;
  
  TheBook1, {["lang", "pt-br"],["type","romance"],["author","John"]}
  TheBook2, {["lang", "en-US"],["type","fiction"],["author","Brian"],["translation","pt-br,es"}
  </code></pre>
  
  <p>Suppose that I have a Library collection and I have a map containing search criteria, like:</p>
  
  <pre><code>Map&lt;String, String&gt; criteria = new HashMap&lt;&gt;();
  criteria.put(BOOK_TYPE, "romance");
  criteria.put(BOOK_LANG, "pt-br");
  </code></pre>
  
  <p>How could I write a filter predicate for the library stream in order to search for all books that fulfil the provided criteria? The match must be a exact String match of the both key and value for now.</p>
  
  <p>Something like this: </p>
  
  <pre><code>Set&lt;Book&gt; result = library.stream()
  .filter(b-&gt; b.getProperties() **????**)
  .collect(Collectors.toSet());
  </code></pre>