diff --git "a/notes/Java \345\256\271\345\231\250.md" "b/notes/Java \345\256\271\345\231\250.md" index fd1ee97e5cc9a92e59c29b763fbaf34d2060991d..84189928af5c810492dd1ea3654ef2c49c8737de 100644 --- "a/notes/Java \345\256\271\345\231\250.md" +++ "b/notes/Java \345\256\271\345\231\250.md" @@ -13,7 +13,7 @@ * [HashMap](#hashmap) * [ConcurrentHashMap](#concurrenthashmap) * [LinkedHashMap](#linkedhashmap) - * [WeekHashMap](#weekhashmap) + * [WeakHashMap](#weakhashmap) * [附录](#附录) * [参考资料](#参考资料) @@ -974,7 +974,7 @@ void afterNodeAccess(Node e) { // move node to last ### afterNodeInsertion() -在 put 等操作之后执行,当 removeEldestEntry() 方法返回 ture 时会移除最晚的节点,也就是链表首部节点 first。 +在 put 等操作之后执行,当 removeEldestEntry() 方法返回 true 时会移除最晚的节点,也就是链表首部节点 first。 evict 只有在构建 Map 的时候才为 false,在这里为 true。 @@ -1034,7 +1034,7 @@ public static void main(String[] args) { [3, 1, 4] ``` -## WeekHashMap +## WeakHashMap ### 存储结构