code: private RedBlackTreeNode<Key, Value> balance(RedBlackTreeNode<Key, Value> h) {
  	// assert (h != null);
  
  	if (isRed(h.getRight()))
  	    h = rotateLeft(h);
  	if (isRed(h.getLeft()) && isRed(h.getLeft().getLeft()))
  	    h = rotateRight(h);
  	if (isRed(h.getLeft()) && isRed(h.getRight()))
  	    flipColors(h);
  
  	h.setSize(size(h.getLeft()) + size(h.getRight()) + 1);
  	return h;
      }
docs: restore red-black tree invariant