MCPcopy Create free account
hub / github.com/apache/poi / isRightChild

Method isRightChild

src/java/org/apache/poi/util/BinaryTree.java:726–735  ·  view source on GitHub ↗

is this node its parent's right child? mind you, the node, or its parent, may not exist. no problem. if the node doesn't exist ... it's its non-existent parent's right child. If the node does exist but has no parent ... no, we're not the non-existent parent's right child. Otherwise (both the specifi

(Node node, int index)

Source from the content-addressed store, hash-verified

724 * @param index _KEY or _VALUE
725 */
726 private static boolean isRightChild(Node node, int index)
727 {
728 if (node == null) {
729 return true;
730 }
731 if (node.getParent(index) == null) {
732 return false;
733 }
734 return node == node.getParent(index).getRight(index);
735 }
736
737 /**
738 * do a rotate left. standard fare in the world of balanced trees

Callers 1

doRedBlackInsertMethod · 0.95

Calls 2

getParentMethod · 0.65
getRightMethod · 0.65

Tested by

no test coverage detected