gov.sns.xal.smf.impl.qualify
Class OrTypeQualifier

java.lang.Object
  |
  +--gov.sns.xal.smf.impl.qualify.OrTypeQualifier
All Implemented Interfaces:
TypeQualifier

public class OrTypeQualifier
extends java.lang.Object
implements TypeQualifier

OrTypeQualifier is a compound qualifier that tests whether any of its qualifiers matches the accelerator node. If any one of its root qualifiers returns true for matching a node, then this compound match operation will return true, otherwise it will not match the node.


Constructor Summary
OrTypeQualifier()
          Creates new OrTypeQualifier
 
Method Summary
 boolean match(AcceleratorNode node)
          Determine if the specified node is a match based on this qualifier's criteria.
 OrTypeQualifier or(java.lang.String kind)
          Add a "kind" qualifier to the set of root qualifiers.
 OrTypeQualifier or(TypeQualifier qualifier)
          Add a qualifier to the set of root qualifiers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrTypeQualifier

public OrTypeQualifier()
Creates new OrTypeQualifier

Method Detail

or

public OrTypeQualifier or(java.lang.String kind)
Add a "kind" qualifier to the set of root qualifiers.

Parameters:
kind - The node type of the new root qualifier
Returns:
This instance for convenience of chaining "or" operations.

or

public OrTypeQualifier or(TypeQualifier qualifier)
Add a qualifier to the set of root qualifiers.

Parameters:
qualifier - A qualifier to "or" with the existing root qualifiers.
Returns:
This instance for convenience of chaining "or" operations.

match

public boolean match(AcceleratorNode node)
Determine if the specified node is a match based on this qualifier's criteria. One or more root qualifiers must match the node otherwise it will return false even if there are no root qualifiers.

Specified by:
match in interface TypeQualifier
Parameters:
node - The node to test
Returns:
true if the node is a match to at least one root qualifier and false if not