void (@NotNull Node<T> n) { checkMax(false); IntervalNode<T> node1 = (IntervalNode<T>)n; IntervalNode<T> node2 = node1.getLeft(); IntervalNode<T> node3 = node1.getRight(); IntervalNode<T> parent = node1.getParent(); int deltaUp = parent == null ? 0 : parent.computeDeltaUpToRoot(); pushDelta(node1); pushDelta(node2); pushDelta(node3); super.rotateRight(node1); if (node3 != null) { correctMax(node3, deltaUp); } correctMax(node1, deltaUp); correctMax(node2, deltaUp); assertAllDeltasAreNull(node1); assertAllDeltasAreNull(node2); assertAllDeltasAreNull(node3); checkMax(false); }