Package xal.smf.impl.qualify
Class OrTypeQualifier
java.lang.Object
xal.smf.impl.qualify.OrTypeQualifier
- All Implemented Interfaces:
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.
- Author:
- tap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
match
(AcceleratorNode node) Determine if the specified node is a match based on this qualifier's criteria.Add a "kind" qualifier to the set of root qualifiers.Or the specified qualifiers by kind with this one.or
(TypeQualifier qualifier) Add a qualifier to the set of root qualifiers.or
(TypeQualifier... qualifiers) Or the specified qualifiers with this one.static OrTypeQualifier
qualifierForKinds
(String... kinds) Get a qualifier that matches for any of the specified node types.static OrTypeQualifier
qualifierForQualifiers
(TypeQualifier... qualifiers) Get a qualifier that matches for any of the specified qualifiers.
-
Constructor Details
-
OrTypeQualifier
public OrTypeQualifier()Creates new OrTypeQualifier
-
-
Method Details
-
or
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
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.
-
or
Or the specified qualifiers by kind with this one.- Parameters:
kinds
- the array of node types- Returns:
- this qualifier
-
or
Or the specified qualifiers with this one.- Parameters:
qualifiers
- the array of node qualifiers- Returns:
- this qualifier
-
qualifierForKinds
Get a qualifier that matches for any of the specified node types.- Parameters:
kinds
- the array of node types- Returns:
- a qualifier that matches for any of the given node types
-
qualifierForQualifiers
Get a qualifier that matches for any of the specified qualifiers.- Parameters:
qualifiers
- the array of node qualifiers- Returns:
- a qualifier that matches for any of the given qualifiers
-
match
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 interfaceTypeQualifier
- Parameters:
node
- The node to test- Returns:
- true if the node is a match to at least one root qualifier and false if not
-