()
| 873 | } |
| 874 | |
| 875 | private AvlNode<E> rotateLeft() { |
| 876 | checkState(right != null); |
| 877 | AvlNode<E> newTop = right; |
| 878 | this.right = newTop.left; |
| 879 | newTop.left = this; |
| 880 | newTop.totalCount = this.totalCount; |
| 881 | newTop.distinctElements = this.distinctElements; |
| 882 | this.recompute(); |
| 883 | newTop.recomputeHeight(); |
| 884 | return newTop; |
| 885 | } |
| 886 | |
| 887 | private AvlNode<E> rotateRight() { |
| 888 | checkState(left != null); |