javax.slee.profile.query
Class And

java.lang.Object
  extended by javax.slee.profile.query.QueryExpression
      extended by javax.slee.profile.query.CompositeQueryExpression
          extended by javax.slee.profile.query.And
All Implemented Interfaces:
java.io.Serializable

public final class And
extends CompositeQueryExpression

The And class is a composite dynamic query expression that successfully matches with a profile only if all nested query expressions also match with the profile.

See Also:
Serialized Form

Constructor Summary
And(QueryExpression[] exprs)
          Create an And query expression initially populated with the expressions contained in the specified array.
And(QueryExpression expr1, QueryExpression expr2)
          Create an And query expression initially populated with the two specified query expressions.
 
Method Summary
 And and(QueryExpression expr)
          Add the specified query expression to this composite expression.
protected  void toString(java.lang.StringBuffer buf)
          Get a string representation for this query expression.
 
Methods inherited from class javax.slee.profile.query.CompositeQueryExpression
add, getExpressions
 
Methods inherited from class javax.slee.profile.query.QueryExpression
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

And

public And(QueryExpression expr1,
           QueryExpression expr2)
Create an And query expression initially populated with the two specified query expressions.

Parameters:
expr1 - the first query expression to add.
expr2 - the second query expression to add.
Throws:
java.lang.NullPointerException - if either argument is null.

And

public And(QueryExpression[] exprs)
Create an And query expression initially populated with the expressions contained in the specified array.

Parameters:
exprs - the query expressions to add.
Throws:
java.lang.NullPointerException - if exprs is null or contains null elements.
java.lang.IllegalArgumentException - if the length of exprs is less than 2.
Method Detail

and

public And and(QueryExpression expr)
        throws java.lang.NullPointerException,
               java.lang.IllegalArgumentException
Add the specified query expression to this composite expression.

Parameters:
expr - the query expression to add.
Returns:
a reference to this.
Throws:
java.lang.NullPointerException - if expr is null.
java.lang.IllegalArgumentException - if adding the query expression to this composite expression would generate a cyclic expression.

toString

protected void toString(java.lang.StringBuffer buf)
Description copied from class: QueryExpression
Get a string representation for this query expression.

Specified by:
toString in class QueryExpression
Parameters:
buf - a string buffer the string representation should be appended to.


Copyright © 2009. All Rights Reserved.