I can came across comparing AtomicInteger
instances in my code and found no equals methods overridden. However java.lang.Integer
does provide implementation for equals
/hashCode
methods.
The users shall take alternate route of comparing int from get()
or getInt()
methods.
My question is what stopped Sir. Doug Lea to not override equals
/hashCode
methods? I am sure there are valid reasons for it which I am not aware of.