MCPcopy Create free account
hub / github.com/ReadyTalk/avian / successor

Method successor

classpath/avian/PersistentSet.java:373–387  ·  view source on GitHub ↗
(Node<T> n,
                                             Cell<Node<T>> ancestors)

Source from the content-addressed store, hash-verified

371 }
372
373 private static <T> Cell<Node<T>> successor(Node<T> n,
374 Cell<Node<T>> ancestors)
375 {
376 if (n.right != NullNode) {
377 n.right = new Node(n.right);
378 return minimum(n.right, new Cell(n, ancestors));
379 }
380
381 while (ancestors != null && n == ancestors.value.right) {
382 n = ancestors.value;
383 ancestors = ancestors.next;
384 }
385
386 return ancestors;
387 }
388
389 private static <T> Cell<Node<T>> predecessor(Node<T> n,
390 Cell<Node<T>> ancestors)

Callers 1

removeMethod · 0.95

Calls 1

minimumMethod · 0.95

Tested by

no test coverage detected