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

Method isLeftChild

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

is this node its parent's left 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 left child. If the node does exist but has no parent ... no, we're not the non-existent parent's left child. Otherwise (both the specified

(Node node, int index)

Source from the content-addressed store, hash-verified

703 * @param index _KEY or _VALUE
704 */
705 private static boolean isLeftChild(Node node, int index) {
706 if (node == null) {
707 return true;
708 }
709 if (node.getParent(index) == null) {
710 return false;
711 }
712 return node == node.getParent(index).getLeft(index);
713 }
714
715 /**
716 * is this node its parent's right child? mind you, the node, or

Callers 2

doRedBlackInsertMethod · 0.95
doRedBlackDeleteFixupMethod · 0.95

Calls 2

getParentMethod · 0.65
getLeftMethod · 0.65

Tested by

no test coverage detected