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)
| 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 |
no test coverage detected