MCPcopy Create free account
hub / github.com/davidgiven/luje / leftRotate

Method leftRotate

lib/java/util/TreeMap.java:1790–1808  ·  view source on GitHub ↗
(Node<K, V> x)

Source from the content-addressed store, hash-verified

1788
1789
1790 private void leftRotate(Node<K, V> x) {
1791 Node<K, V> y = x.right;
1792 x.right = y.left;
1793 if (y.left != null) {
1794 y.left.parent = x;
1795 }
1796 y.parent = x.parent;
1797 if (x.parent == null) {
1798 root = y;
1799 } else {
1800 if (x == x.parent.left) {
1801 x.parent.left = y;
1802 } else {
1803 x.parent.right = y;
1804 }
1805 }
1806 y.left = x;
1807 x.parent = y;
1808 }
1809
1810
1811 /**

Callers 2

balanceMethod · 0.95
fixupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected