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