问题
I started using AtomicReference
in Java beans to have the 3state semantic when reading objects from JSON. As I like to have equals and hashCode implementations in my beans I'm wondering why AtomicReference
doesn't override equals. The implementation would be trivial (simply delegate to the wrapped value).
Are there any good reasons AtomicReference
doesn't override equals and hashCode?!
来源:https://stackoverflow.com/questions/61803956/why-doesnt-atomicreference-override-equals