public BSTreeWParent<T> predecessor()
    {
        if (left == null) {
            BSTreeWParent<T> curr = this;
            while (curr.parent != null && parent.right != curr) {
                curr = curr.parent;
            }
            return curr.parent;
        }
        BSTreeWParent<T> pred = getLeftWParent();
        while (pred != null && pred.right != null) {
            pred = pred.getRightWParent();
        }
        return pred;
    }