Class OrTypeQualifier

java.lang.Object
xal.smf.impl.qualify.OrTypeQualifier
All Implemented Interfaces:
TypeQualifier

public class OrTypeQualifier extends 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.
Author:
tap
  • Constructor Details

    • OrTypeQualifier

      public OrTypeQualifier()
      Creates new OrTypeQualifier
  • Method Details

    • or

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

      public OrTypeQualifier or(String... kinds)
      Or the specified qualifiers by kind with this one.
      Parameters:
      kinds - the array of node types
      Returns:
      this qualifier
    • or

      public OrTypeQualifier or(TypeQualifier... qualifiers)
      Or the specified qualifiers with this one.
      Parameters:
      qualifiers - the array of node qualifiers
      Returns:
      this qualifier
    • qualifierForKinds

      public static OrTypeQualifier qualifierForKinds(String... kinds)
      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

      public static OrTypeQualifier qualifierForQualifiers(TypeQualifier... qualifiers)
      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

      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