Java sets: why there is no T get(Object o)?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/861296/why-does-the-java-util-setv-interface-not-provide-a-getobject-o-method">Why does the java.util.Set&lt;V&gt; interface not provide a get(Object o) method?</a>  </p>
</blockquote>



<p>Why Java sets don't have methods for retrieving an element that is equal to provided?</p>

<p>For example, I need to create an object pool, something like String.intern() method (yes, I know that this is usually done with weak references), so I need to create a Map and do map.put(o,o) to put my unique object if they are not present in the map. But a set is more appropriate in this case I think.</p>
