title: Why does iterating over entry set not work?
body: <p>I try to iterate over an EntrySet like this:</p>
  <pre><code> for (Entry&lt;A, List&lt;B&gt;&gt; list : service.entrySet()) {
                  if (list.getKey() == typ1) {
                      for (B current : list.getValue()) {                            
                        // do sth
                      }
                  }
                 
                  } else {
                      PrintHelper.printOut(&quot;not implemented case&quot;
                              + list.getKey());
                  }
              }
         }
  </code></pre>
  <p>Even though I have that part <code>if (list.getKey() == typ1) </code> I still get the printed case <code>not implemented case typ1</code>.</p>
  <p>Why is that the case? What am I doing wrong with the iteration/ the if case?</p>