Class AndTypeQualifier

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

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

    • AndTypeQualifier

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

    • and

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

      public AndTypeQualifier and(TypeQualifier... qualifiers)
      And the specified qualifiers with this one.
      Parameters:
      qualifiers - the array of node qualifiers
      Returns:
      this qualifier
    • qualifierWithQualifiers

      public static AndTypeQualifier qualifierWithQualifiers(TypeQualifier... qualifiers)
      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

      public AndTypeQualifier andStatus(boolean nodeStatus)
      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

      public static AndTypeQualifier qualifierWithStatusAndType(boolean nodeStatus, String type)
      Get an qualifier for the specified node status and type.
      Parameters:
      nodeStatus - the node status
      type - the node type
      Returns:
      a qualifier restricted to both the status and type specified
    • 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