Question

I've been reading that ComputingMap only supports identity equality and not the equals(). Can someone clarify why?

Was it helpful?

Solution

As for all concurrent maps built using MapMaker, equals() is used for strong references and identity equality is used for weak and soft references.

See softKeys, weakKeys, softValues, weakValues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top