Class AnyNodeTest


public final class AnyNodeTest extends NodeTest
NodeTest is an interface that enables a test of whether a node has a particular name and type. An AnyNodeTest matches any node.
Author:
Michael H. Kay
  • Field Details

  • Constructor Details

    • AnyNodeTest

      public AnyNodeTest()
  • Method Details

    • getInstance

      public static AnyNodeTest getInstance()
      Get an instance of AnyNodeTest
    • matches

      public final boolean matches(NodeInfo node)
      Test whether this node test is satisfied by a given node
      Specified by:
      matches in class NodeTest
    • matches

      public final boolean matches(short nodeType, int fingerprint)
      Test whether this node test is satisfied by a given node
      Specified by:
      matches in class NodeTest
      Parameters:
      nodeType - The type of node to be matched
      fingerprint - identifies the expanded name of the node to be matched
    • getDefaultPriority

      public final double getDefaultPriority()
      Determine the default priority of this node test when used on its own as a Pattern
      Overrides:
      getDefaultPriority in class Pattern