code: private void rotateLeft(TreeMapEntry<K,V> p) {
          if (p != null) {
              TreeMapEntry<K,V> r = p.right;
              p.right = r.left;
              if (r.left != null)
                  r.left.parent = p;
              r.parent = p.parent;
              if (p.parent == null)
                  root = r;
              else if (p.parent.left == p)
                  p.parent.left = r;
              else
                  p.parent.right = r;
              r.left = p;
              p.parent = r;
          }
      }
docs: From CLR