(Node<K, V> x)
| 1073 | } |
| 1074 | |
| 1075 | static private <K, V> Node<K, V> successor(Node<K, V> x) { |
| 1076 | if (x.right != null) { |
| 1077 | return minimum(x.right); |
| 1078 | } |
| 1079 | Node<K, V> y = x.parent; |
| 1080 | while (y != null && x == y.right) { |
| 1081 | x = y; |
| 1082 | y = y.parent; |
| 1083 | } |
| 1084 | return y; |
| 1085 | } |
| 1086 | |
| 1087 | /** |
| 1088 | * Returns the comparator used to compare elements in this map. |