[concurrency-interest] Reference/IdentityMap toString
jason_mehrens at hotmail.com
Fri Aug 20 10:20:38 EDT 2010
> I think you're basically arguing that IdentityHashMap (and any "map" or
> "set" that uses identity == rather than the equals contract) is broken.
IdentityHashMap has a nice warning in the javadocs which is great. Specifically, I'm arguing that any map that doesn't use the equals contract but uses the AbstractMap.toString is broken. The reason is that map containment is determined by the equivalence relationship and AbstractMap.toString lists what is contained in the map. Therefore, the string representation of a map must accurately describe the equivalence relationship, otherwise the string representation is broken.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest