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

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

public class AndTypeQualifier
extends java.lang.Object
implements TypeQualifier

AndTypeQualifier is a compound qualifier that tests whether all of its root qualifiers match the accelerator node. If and only if the set of root qualifiers all match the node then this qualifier matches the node also.


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

Constructor Detail

AndTypeQualifier

public AndTypeQualifier()
Creates a new AndTypeQualifier with no initial root qualifiers

Method Detail

and

public AndTypeQualifier and(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 "and" operations.

and

public AndTypeQualifier and(TypeQualifier qualifier)
Add a qualifier to the set of root qualifiers.

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

match

public boolean match(AcceleratorNode node)
Determine if the specified node is a match based on this qualifier's criteria. All root qualifiers must match the node to return true. If the set of root qualifiers is empty, the match is still true.

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