编写一个多条件过滤功能时,想使用map作为过滤条件的容器,由于存在同一健匹配多个值的情况,所以就发现了jdk8的新的map:IdentityHashMap。使用它完美解决了我的问题。
对比IdentityHashMap与HashTable、HashMap,代码如下:
这篇文章对IdentityHashMap分析的很棒,墙裂推荐!
编写一个多条件过滤功能时,想使用map作为过滤条件的容器,由于存在同一健匹配多个值的情况,所以就发现了jdk8的新的map:IdentityHashMap。使用它完美解决了我的问题。
对比IdentityHashMap与HashTable、HashMap,代码如下:
这篇文章对IdentityHashMap分析的很棒,墙裂推荐!
转载于:https://www.cnblogs.com/miaoying/p/10813179.html