Update Java 容器.md

更正错别字 LUR 为LRU
This commit is contained in:
no one 2018-08-13 16:45:09 +08:00 committed by GitHub
parent 4168b1ccab
commit 4b569bd08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1012,7 +1012,7 @@ protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
以下是使用 LinkedHashMap 实现的一个 LRU 缓存:
- 设定最大缓存空间 MAX_ENTRIES 为 3
- 使用 LinkedHashMap 的构造函数将 accessOrder 设置为 true开启 LUR 顺序;
- 使用 LinkedHashMap 的构造函数将 accessOrder 设置为 true开启 LRU 顺序;
- 覆盖 removeEldestEntry() 方法实现,在节点多于 MAX_ENTRIES 就会将最近最久未使用的数据移除。
```java