title: HashMap containsKey() returns false although hashCode() and equals() are true
body: <p>I have a <code>HashMap&lt;Vertex, Integer&gt;</code> called <code>vertexIndexes</code>. If I iterate through it with this code:</p>
  
  <pre><code>public boolean search(String vertexName){
      for (Vertex name: vertexIndexes.keySet()){        
          String key =   name.toString();
          String value = vertexIndexes.get(name).toString();              
          System.out.println(key + " " + value + " "+ (name.hashCode() == vertexName.hashCode()) + " " + name.equals(vertexName));  
      }
  ...
  }
  </code></pre>
  
  <p>it produces this output:</p>
  
  <pre><code>Diessen 0 false false
  Herrsching 5 false false
  Schondorf 2 false false
  Greifenberg 3 false false
  Stegen 4 false false
  Utting 1 false false
  Andechs 6 false false
  Fischen 7 true true
  </code></pre>
  
  <p>So you can see, that the Vertex <code>Fischen</code> is present and the <code>hashCode</code> and <code>equals</code> methods work fine. But if I run</p>
  
  <pre><code>vertexIndexes.containsKey("Fischen")
  </code></pre>
  
  <p>it returns <code>false</code>.</p>
  
  <p>Why is that? I lose my mind over it.</p>