Java: Retrieving an element from a HashSet
<p>Hoping someone can explain why I cannot retrieve an element from a <code>HashSet</code>.</p>

<p>Consider my <code>HashSet</code> containing a list of <code>MyHashObjects</code> with their <code>hashCode()</code> and <code>equals()</code> methods overridden correctly.</p>

<p>What I was hoping to do was to construct a <code>MyHashObject</code> myself, and set the relevant hash code properties to certain values.
I can query the <code>HashSet</code> to see if there "equivalent" objects in the set using the <code>contains()</code> method.
So even though <code>contains()</code> returns true for the 2 objects, they may not be <code>==</code> true.</p>

<p>How come then there is no <code>get()</code> method similar to how the <code>contains()</code> works?</p>

<p>Interested to know the thinking behind this API decision</p>
