()
| 4355 | /// |
| 4356 | /// - `NoSuchElementException`: if this map is empty. |
| 4357 | public K lastKey() { |
| 4358 | if (root != null) { |
| 4359 | Node<K, V> node = maximum(root); |
| 4360 | return node.keys[node.right_idx]; |
| 4361 | } |
| 4362 | throw new NoSuchElementException(); |
| 4363 | } |
| 4364 | |
| 4365 | static <K, V> Entry<K, V> maximum(Entry<K, V> x) { |
| 4366 | while (x.right != null) { |