com.icl.saxon.pattern
Class NodeTypeTest
java.lang.Object
   com.icl.saxon.pattern.Pattern
com.icl.saxon.pattern.Pattern
       com.icl.saxon.pattern.NodeTest
com.icl.saxon.pattern.NodeTest
           com.icl.saxon.pattern.NodeTypeTest
com.icl.saxon.pattern.NodeTypeTest
- public class NodeTypeTest- extends NodeTest
NodeTest is an interface that enables a test of whether a node has a particular
 name and type. A NodeTypeTest matches the node type only.
 
 
 
| Method Summary | 
|  double | getDefaultPriority()Determine the default priority of this node test when used on its own as a Pattern
 | 
|  short | getNodeType()Determine the types of nodes to which this pattern applies.
 | 
|  boolean | matches(NodeInfo node)Test whether this node test is satisfied by a given node
 | 
|  boolean | matches(short nodeType,
        int fingerprint)Test whether this node test is satisfied by a given node
 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
NodeTypeTest
public NodeTypeTest(short nodeType)
matches
public final boolean matches(NodeInfo node)
- Test whether this node test is satisfied by a given node
 
- 
- Specified by:
- matchesin class- NodeTest
 
- 
 
matches
public boolean matches(short nodeType,
                       int fingerprint)
- Test whether this node test is satisfied by a given node
 
- 
- Specified by:
- matchesin 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:
- getDefaultPriorityin class- Pattern
 
- 
 
getNodeType
public short getNodeType()
- Determine the types of nodes to which this pattern applies. Used for optimisation.
 
- 
- Overrides:
- getNodeTypein class- Pattern
 
- 
- Returns:
- the type of node matched by this pattern. e.g. NodeInfo.ELEMENT or NodeInfo.TEXT