This is more of a design question in which I am curious as to why the HashSet does not support put like operation with the add.
If I want to update an object with equal hashCode as an existing object I have to do this:
hashSet.remove(o);
hasSet.add(o);
I think a
hashSet.add(o);
should have sufficed since it uses a HashMap under the hood anyway.
