Use cases for IdentityHashMap

后端 未结 7 679
谎友^
谎友^ 2020-12-12 13:31

Could anyone please tell what are the important use cases of IdentityHashMap?

相关标签:
7条回答
  • 2020-12-12 14:32

    Whenever you want your keys not to be compared by equals but by == you would use an IdentityHashMap. This can be very useful if you're doing a lot of reference-handling but it's limited to very special cases only.

    0 讨论(0)
提交回复
热议问题