net.sf.saxon.pattern
Class CombinedNodeTest

java.lang.Object
  |
  +--net.sf.saxon.pattern.Pattern
        |
        +--net.sf.saxon.pattern.NodeTest
              |
              +--net.sf.saxon.pattern.CombinedNodeTest
All Implemented Interfaces:
java.io.Serializable

public class CombinedNodeTest
extends NodeTest

A CombinedNodeTest combines two nodetests using one of the operators union (=or), intersect (=and), difference (= "and not"). This arises when optimizing a union (etc) of two path expressions using the same axis

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.pattern.Pattern
originalText
 
Constructor Summary
CombinedNodeTest(NodeTest nt1, int operator, NodeTest nt2)
           
 
Method Summary
 boolean allowsTextNodes()
          Indicate whether this NodeTest is capable of matching text nodes
 boolean matches(int nodeType, int fingerprint, int annotation)
          Test whether this node test is satisfied by a given node.
 java.lang.String toString()
          Get the original pattern text
 
Methods inherited from class net.sf.saxon.pattern.NodeTest
getNodeTest, matches
 
Methods inherited from class net.sf.saxon.pattern.Pattern
getDefaultPriority, getFingerprint, getItemType, getLineNumber, getSystemId, internalMatches, make, setLineNumber, setOriginalText, setSystemId, simplify, typeCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CombinedNodeTest

public CombinedNodeTest(NodeTest nt1,
                        int operator,
                        NodeTest nt2)
Method Detail

matches

public boolean matches(int nodeType,
                       int fingerprint,
                       int annotation)
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. The value should be -1 for a node with no name.
annotation - The actual content type of the node

toString

public java.lang.String toString()
Description copied from class: Pattern
Get the original pattern text

Overrides:
toString in class Pattern

allowsTextNodes

public boolean allowsTextNodes()
Indicate whether this NodeTest is capable of matching text nodes

Specified by:
allowsTextNodes in class NodeTest