title: How can AbstractMap.SimpleEntry be mutable?
body: <p>How can <a href="http://docs.oracle.com/javase/7/docs/api/java/util/AbstractMap.SimpleEntry.html" rel="nofollow"><code>AbstractMap.SimpleEntry</code></a> be simultaneously</p>
  
  <p>1) mutable (it's method <code>setValue(</code>) changes value part of the entry)</p>
  
  <p>2) having <code>equals()</code>/<code>hashCode()</code> defined including value part of the entry</p>
  
  <p>3) be the part of <code>Set&lt;Map.Entry&lt;T,K&gt;&gt; entrySet()</code> result</p>
  
  <p>It seems to me, that these three points are controversial. For example, first two violates contract of <code>Set&lt;&gt;</code> interface, which is not recommending to have mutable elements of the set.</p>
  
  <p>May I be sure, that mutating of <code>Value</code> won't break the map?</p>
  
  <p>Why didn't they did <code>Entry</code> comparable and hashable by key only? This would increase speed in some cases?</p>