title: Java 8 lambda expression for finding "contains"
body: <p>I have a method that takes <code>List&lt;String&gt; locations</code> as a parameter. I am populating a list of users in the same method based on a particular condition. Now what I want is, the user should be present in this locations. In short, the user is valid iff user's location is present in the list of locations provided. locations.</p>
  
  <p>This is my current code:</p>
  
  <pre><code>primaryList.stream()
          .filter(some_pattern_matching)[.MATCH THE LOCATION HERE]
          .map(user -&gt; user.getNames())
          .collect(toList())
  </code></pre>
  
  <p>is there any way to say <code>locations.contains(user -&gt; user.getLocation())</code> OR
  <code>user -&gt; user.getLocation().isPresentIn(locations)</code> OR have locations converted into one more stream and then do matching?</p>
  
  <p>This is my current code:</p>
  
  <pre><code> .filter(locations.stream().filter(loc -&gt; loc.equalsIgnoreCase(s.getLocation())))
  </code></pre>
  
  <p>which of course does not compile.</p>