Skip to content

Commit

Permalink
Update java-collection-questions-02.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WindLYLY authored Jul 29, 2024
1 parent 94a0c4c commit 979800a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java/collection/java-collection-questions-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ head:

`NavigableMap` 接口提供了丰富的方法来探索和操作键值对:

1. **定向搜索**: `ceilingEntry()`, `floorEntry()`, `higherEntry()``lowerEntry()` 等方法可以用于定位大于、小于、大于等于、小于等于给定键的最接近的键值对
1. **定向搜索**: `ceilingEntry()`, `floorEntry()`, `higherEntry()``lowerEntry()` 等方法可以用于定位大于等于、小于等于、严格大于、严格小于给定键的最接近的键值对
2. **子集操作**: `subMap()`, `headMap()``tailMap()` 方法可以高效地创建原集合的子集视图,而无需复制整个集合。
3. **逆序视图**:`descendingMap()` 方法返回一个逆序的 `NavigableMap` 视图,使得可以反向迭代整个 `TreeMap`
4. **边界操作**: `firstEntry()`, `lastEntry()`, `pollFirstEntry()``pollLastEntry()` 等方法可以方便地访问和移除元素。
Expand Down

0 comments on commit 979800a

Please sign in to comment.