Why does computingMap support identity equality for keys against equals()?
-
22-09-2019 - |
Question
I've been reading that ComputingMap only supports identity equality and not the equals(). Can someone clarify why?
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