()
| 885 | } |
| 886 | |
| 887 | private AvlNode<E> rotateRight() { |
| 888 | checkState(left != null); |
| 889 | AvlNode<E> newTop = left; |
| 890 | this.left = newTop.right; |
| 891 | newTop.right = this; |
| 892 | newTop.totalCount = this.totalCount; |
| 893 | newTop.distinctElements = this.distinctElements; |
| 894 | this.recompute(); |
| 895 | newTop.recomputeHeight(); |
| 896 | return newTop; |
| 897 | } |
| 898 | |
| 899 | private static long totalCount(@Nullable AvlNode<?> node) { |
| 900 | return (node == null) ? 0 : node.totalCount; |
no test coverage detected