code: protected void rotateRight(final OMVRBTreeEntry<K, V> p) {
      if (p != null) {
        OMVRBTreeEntry<K, V> l = p.getLeft();
        p.setLeft(l.getRight());
        if (l.getRight() != null)
          l.getRight().setParent(p);
        l.setParent(p.getParent());
        if (p.getParent() == null)
          setRoot(l);
        else if (p.getParent().getRight() == p)
          p.getParent().setRight(l);
        else
          p.getParent().setLeft(l);
        l.setRight(p);
        p.setParent(l);
      }
    }
docs: From CLR