Hi all
I don't know if I understood it right, but with HashSet, LinkedHashSet etc etc,
testing whether an object is or isn't present in the Collection is a two-step process: firstly, the object's hashCode is calculated and searched amongst the "buckets" labelled by the already inserted objects' hashCodes, then, if it is found, the method equals() is run against all the object within the found bucket.
HashCode doesn't say us which objects are the same, but different hashCodes SHOULD always tell us that their instances are different.
Hope this helps
Regards
LR
[ December 11, 2007: Message edited by: Luca Romanello ]