title: Elegant way to overcome Unlikely argument type for equals(): Stream<String> seems to be unrelated to String
body: <p>I am looking for elegant way to overcome while comparing any Wrapper object to Stream.</p>
  
  <p>Github working link: <a href="https://github.com/vishwaratna/Unlikely-argument-type-for-equals-Stream-String-/commit/d803f77c923e81fe7531ecb467561ac785d7aca5" rel="nofollow noreferrer">https://github.com/vishwaratna/Unlikely-argument-type-for-equals-Stream-String-/commit/d803f77c923e81fe7531ecb467561ac785d7aca5</a></p>
  
  <p><em>Question in reference</em>: <a href="https://stackoverflow.com/questions/54742057/filtering-keys-from-map-to-list-attribute-in-java-8">Filtering keys from map to list attribute in java-8</a></p>
  
  <p>Recently i faced it while comparing member of <code>List</code> to a key of a <code>Map</code>.
  I know there are other ways to compare without doing what i am doing but i am looking for in general casting, if it is available.</p>
  
  <pre><code>List&lt;student&gt; stulist = Arrays.asList(new student("1", "vishwa",null),
                                                new student("3", "Ravi",null),
                                                new student("2", "Ram",null));
  </code></pre>
  
  <hr>
  
  <pre><code>        Map&lt;String,String&gt; map = new HashMap() {{
               put("1","20");
               put("2","30");
             }};
  </code></pre>
  
  <hr>
  
  <pre><code>System.out.println( stulist.stream()
                      .filter(s-&gt;s.getId()
                      .equals(map.entrySet()
                      .stream() 
                      .map(Map.Entry::getKey)))
                      .count());
  </code></pre>
  
  <p>My code is compiling properly but the output is coming as <strong>"0"</strong>, whereas i expect output as <strong>2</strong>.</p>
  
  <blockquote>
    <p>I am sure it is due to type mismatch, <strong>but why the compiler is not</strong>
    <strong>throwing an error??</strong></p>
  </blockquote>
  
  <p><strong>Warning that i am getting:</strong> <code>Unlikely argument type for equals(): Stream&lt;String&gt; seems to be unrelated to String</code></p>