title: Filter a list with condition on inner list
body: <p>I have a list of objects. Each object contains another list. I want to filter the list with condition on inner list.</p>
  
  <p>For example: </p>
  
  <p>There is a list of factories. Each factory contains a list of different car models it produces.
  I want to filter factory list in such way that I will get only factories that produce Mazda3.</p>
  
  <p>How can I do it with lambda?</p>
  
  <p>It should be something similar to this:</p>
  
  <pre><code>factories.stream().filter(f -&gt; f.getCars().stream().filter(c -&gt; C.getName().equals("Mazda3")).).collect(Collectors.toList());
  </code></pre>