title: Find elements in a list that are not present in another list using java 8
body: <p>I have 2 lists. The requirement is to filter out elements in list1 that are not in list2 based on condition.</p>
  
  <pre><code>  Class Fighter
    {
      String name;
      String address;
    }     
    List&lt;Fighter&gt; pairs1 = new ArrayList();
      pairs1.add(new Fighter("a", "a"));
      pairs1.add(new Fighter("b", "a"));
  
      List&lt;Fighter&gt; pairs2 = new ArrayList();
      pairs2.add(new Fighter("a", "c"));
      pairs2.add(new Fighter("a", "d"));
      Set&lt;Fighter&gt; finalValues = new HashSet&lt;&gt;();
  
  
      finalValues = pairs1.stream().filter(firstList -&gt; 
     pairs2.stream().noneMatch(secondList -&gt; 
     firstList.getName().equals(secondList.getName())
              &amp;&amp; firstList.getName().equals(secondList.getName()))).collect(Collectors.toSet());
  
      System.out.println(finalValues);
  </code></pre>
  
  <p>Expected Output : a=a, b=a</p>
  
  <p>Explanation: Elements in list1 that are not in list2</p>
  
  <p>The above code is not giving the expected output. Please let me know how the above stream code can be corrected to get the output</p>