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