how do I get a unique ID per object in Java?
<p>I made a vector set in order to avoid thrashing the GC with iterator allocations and the like 
( you get a new/free each for both the set reference and the set iterator for each traversal of a HashSet's values or keys )</p>

<p>anyway supposedly the <code>Object.hashCode()</code> method is a unique id per object. (would fail for a 64 bit version?) </p>

<p>But in any case it is overridable and therefore not guaranteed unique, nor unique per object instance.</p>

<p>If I want to create an "ObjectSet" how do I get a guaranteed unique ID for each instance of an object??</p>

<p>I just found this: which answers it.</p>

<p><a href="http://stackoverflow.com/questions/909843/java-how-to-get-the-unique-id-of-an-object-which-overrides-hashcode">Java: How to get the unique ID of an object which overrides hashCode()?</a></p>
