(Entry<K, V> x)
| 4361 | } |
| 4362 | |
| 4363 | static <K, V> Entry<K, V> predecessor(Entry<K, V> x) { |
| 4364 | if (x.left != null) { |
| 4365 | return maximum(x.left); |
| 4366 | } |
| 4367 | Entry<K, V> y = x.parent; |
| 4368 | while (y != null && x == y.left) { |
| 4369 | x = y; |
| 4370 | y = y.parent; |
| 4371 | } |
| 4372 | return y; |
| 4373 | } |
| 4374 | |
| 4375 | static private <K, V> Node<K, V> successor(Node<K, V> x) { |
| 4376 | if (x.right != null) { |