MCPcopy Create free account
hub / github.com/davidgiven/luje / successor

Method successor

lib/java/util/TreeMap.java:1075–1085  ·  view source on GitHub ↗
(Node<K, V> x)

Source from the content-addressed store, hash-verified

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.

Callers 1

cloneMethod · 0.95

Calls 1

minimumMethod · 0.95

Tested by

no test coverage detected