javax.slee.profile.query
Class Or

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

public final class Or
extends CompositeQueryExpression

The Or class is a composite dynamic query expression that successfully matches with a profile if any of the nested query expressions match with the profile.

See Also:
Serialized Form

Constructor Summary
Or(QueryExpression[] exprs)
          Create an Or query expression initially populated with the expressions contained in the specified array.
Or(QueryExpression expr1, QueryExpression expr2)
          Create an Or query expression initially populated with the two specified query expressions.
 
Method Summary
 Or or(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

Or

public Or(QueryExpression expr1,
          QueryExpression expr2)
Create an Or 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.

Or

public Or(QueryExpression[] exprs)
Create an Or 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

or

public Or or(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.