Class NodeTest.NodeTypeNodeFilter

java.lang.Object
org.custommonkey.xmlunit.NodeTest.NodeTypeNodeFilter
All Implemented Interfaces:
NodeFilter
Enclosing class:
NodeTest

private static class NodeTest.NodeTypeNodeFilter extends Object implements NodeFilter
Node type specific Node Filter: accepts Nodes of those types specified in constructor, rejects all others
  • Field Details

    • nodeTypes

      private final short[] nodeTypes
  • Constructor Details

    • NodeTypeNodeFilter

      public NodeTypeNodeFilter(short[] nodeTypes)
      Construct filter for specific node types
      Parameters:
      nodeTypes - note Node.ATTRIBUTE_NODE is not exposed by the DocumentTraversal node iterator unless the root node is itself an attribute - so a NodeTester that needs to test attributes should obtain those attributes from Node.ELEMENT_NODE nodes
  • Method Details

    • acceptNode

      public short acceptNode(Node aNode)
      NodeFilter method.
      Specified by:
      acceptNode in interface NodeFilter
      Parameters:
      aNode -
      Returns:
    • acceptNodeType

      private boolean acceptNodeType(short shortVal)
      Does this instance accept nodes with the node type value
      Parameters:
      shortVal -
      Returns: