title: Java 8: Filter list inside object with another list
body: <p>I have a list named "foodList" which contains elements of type "Food". The object Food contains a List named "categories" of type "Category".</p>
  
  <p>I am currently implementing a search algorithm to filter food by excluding certain categories.</p>
  
  <p>Excluded Categories are stored inside a List named "excludedCategories".</p>
  
  <p>How can I, using Java 8 and streams, filter the foodList by excluding Food objects whose categoryLists contain any element of the excludedCategories list?</p>
  
  <p>Sample code with loops:</p>
  
  <pre><code>for (Food f: foodList)
  {
       for (Category c: f.categories)
       {
            if (excludedCategories.contains(c))
            {
                 // REMOVE ITEM FROM foodList
            }
       }
  }
  </code></pre>
  
  <p>Thank you!</p>