MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / leftRotate

Method leftRotate

vm/JavaAPI/src/java/util/TreeMap.java:4759–4777  ·  view source on GitHub ↗
(Node<K, V> x)

Source from the content-addressed store, hash-verified

4757 }
4758
4759 private void leftRotate(Node<K, V> x) {
4760 Node<K, V> y = x.right;
4761 x.right = y.left;
4762 if (y.left != null) {
4763 y.left.parent = x;
4764 }
4765 y.parent = x.parent;
4766 if (x.parent == null) {
4767 root = y;
4768 } else {
4769 if (x == x.parent.left) {
4770 x.parent.left = y;
4771 } else {
4772 x.parent.right = y;
4773 }
4774 }
4775 y.left = x;
4776 x.parent = y;
4777 }
4778
4779 /**
4780 * Copies all the mappings in the given map to this map. These mappings will

Callers 2

balanceMethod · 0.95
fixupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected