api/jar/src/main/java/javax/slee/profile/query/CompositeQueryExpression.java
protected final void add(QueryExpression expr) throws NullPointerException, IllegalArgumentException {
        if (expr == null) throw new NullPointerException("expr is null");

        // check for cycles
        if (expr instanceof CompositeQueryExpression) {
            ((CompositeQueryExpression)expr).checkForCycles(this);
        }
        else if (expr instanceof Not) {
            ((Not)expr).checkForCycles(this);
        }

        // no cycles, so add the expression to the list
        exprs.add(expr);
    }
protected final void add(QueryExpression expr) throws NullPointerException, IllegalArgumentException {
        if (expr == null) throw new NullPointerException("expr is null");

        // check for cycles
        if (expr instanceof CompositeQueryExpression) {
            ((CompositeQueryExpression)expr).checkForCycles(this);
        }
        else if (expr instanceof Not) {
            ((Not)expr).checkForCycles(this);
        }

        // no cycles, so add the expression to the list
        exprs.add(expr);
    }
Add a query expression to this composite expression.
@param expr the expression to add.
@throws NullPointerException if <code>expr</code> is <code>null</code>.
@throws IllegalArgumentException if adding the query expression to this
composite expression would generate a cyclic expression.