Package xal.smf.impl.qualify
Class AndTypeQualifier
java.lang.Object
xal.smf.impl.qualify.AndTypeQualifier
- All Implemented Interfaces:
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.
- Author:
- tap
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AndTypeQualifier with no initial root qualifiers -
Method Summary
Modifier and TypeMethodDescriptionAdd a "kind" qualifier to the set of root qualifiers.and
(TypeQualifier qualifier) Add a qualifier to the set of root qualifiers.and
(TypeQualifier... qualifiers) And the specified qualifiers with this one.andStatus
(boolean nodeStatus) And this qualifier with the specified node status qualification.boolean
match
(AcceleratorNode node) Determine if the specified node is a match based on this qualifier's criteria.static AndTypeQualifier
qualifierWithQualifiers
(TypeQualifier... qualifiers) Get a qualifier that matches for each of the specified qualifiers.static AndTypeQualifier
qualifierWithStatusAndType
(boolean nodeStatus, String type) Get an qualifier for the specified node status and type.
-
Constructor Details
-
AndTypeQualifier
public AndTypeQualifier()Creates a new AndTypeQualifier with no initial root qualifiers
-
-
Method Details
-
and
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
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.
-
and
And the specified qualifiers with this one.- Parameters:
qualifiers
- the array of node qualifiers- Returns:
- this qualifier
-
qualifierWithQualifiers
Get a qualifier that matches for each of the specified qualifiers.- Parameters:
qualifiers
- the array of node qualifiers- Returns:
- a qualifier that matches for each of the qualifiers
-
andStatus
And this qualifier with the specified node status qualification.- Parameters:
nodeStatus
- the status of nodes for which we wish to filter- Returns:
- this instance
-
qualifierWithStatusAndType
Get an qualifier for the specified node status and type.- Parameters:
nodeStatus
- the node statustype
- the node type- Returns:
- a qualifier restricted to both the status and type specified
-
match
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 interfaceTypeQualifier
- Parameters:
node
- The node to test- Returns:
- true if the node is a match and false if not
-