private boolean isBlackValid() {
            if (isLeaf()) {
                return true;
            } else {
                if (hasRightChild() && hasLeftChild()) {
                    return getRightChild().blackDepth() == getLeftChild()
                            .blackDepth();
                } else if (hasLeftChild()) {
                    return getLeftChild().blackDepth() == 0;
                } else { // hasRightChild()
                    return getRightChild().blackDepth() == 0;
                }
            }
        }