代码之家  ›  专栏  ›  技术社区  ›  Aravind Yarram

为什么computingmap支持键对equals()的标识相等?

  •  2
  • Aravind Yarram  · 技术社区  · 15 年前

    我一直在读,computingmap只支持标识相等,而不支持equals()。有人能解释为什么吗?

    1 回复  |  直到 15 年前
        1
  •  0
  •   Andres Rodriguez    15 年前

    对于所有使用 MapMaker ,equals()用于强引用,标识相等用于弱引用和软引用。

    softKeys , weakKeys , softValues ,请 weakValues .

    推荐文章