title: Java 8 streams - filter by comparing two lists
body: <p>I have 2 lists which are different from one another</p>
  
  <pre><code>public class App1{
      private String name;
      private String city;
  
      // getter setter
  
      // constructors
  }
  
  public class App2{
      private String differentName;
      private String differentCity;
      private String someProperty1;
      private String someProperty2;
  
      // getter setter
  
      // constructors
  }
  
  List&lt;App1&gt; app1List = new ArrayList&lt;&gt;();
  app1List.add(new App1("test1","city1"));
  app1List.add(new App1("test2","city2"));
  app1List.add(new App1("test3","city3"));
  app1List.add(new App1("test4","city4"));
  
  List&lt;App2&gt; app2List = new ArrayList&lt;&gt;();
  app2List.add(new App2("test2","city2"));
  app2List.add(new App2("test3","city3"));
  </code></pre>
  
  <p>As you see the App1 &amp; App2 class are 2 different pojos having different property names, however the content/value that's held by name,city &amp; differentName,differentCity property respectively is same i.e. test1, test2, test3 &amp; city1, city2 etc</p>
  
  <p>Now I need to filter app1List comparing names &amp; city in other list i.e. app2List that doesn't exists.</p>
  
  <p>final output would be</p>
  
  <pre><code>app1List.add(new App1("test1","city1"));
  app1List.add(new App1("test4","city4"));
  </code></pre>
  
  <p>Easiest way is to loop one of the other lists multiple time which i am trying to avoid. Is there any way in Java 8 streams without having to loop multiple times??</p>