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

Method leftRotate

Ports/CLDC11/src/java/util/TreeMap.java:4781–4799  ·  view source on GitHub ↗
(Node<K, V> x)

Source from the content-addressed store, hash-verified

4779 }
4780
4781 private void leftRotate(Node<K, V> x) {
4782 Node<K, V> y = x.right;
4783 x.right = y.left;
4784 if (y.left != null) {
4785 y.left.parent = x;
4786 }
4787 y.parent = x.parent;
4788 if (x.parent == null) {
4789 root = y;
4790 } else {
4791 if (x == x.parent.left) {
4792 x.parent.left = y;
4793 } else {
4794 x.parent.right = y;
4795 }
4796 }
4797 y.left = x;
4798 x.parent = y;
4799 }
4800
4801 /// Copies all the mappings in the given map to this map. These mappings will
4802 /// replace all mappings that this map had for any of the keys currently in

Callers 2

balanceMethod · 0.95
fixupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected