net.sf.saxon.pattern
public class SubstitutionGroupTest extends NodeTest
Note that the SubstitutionGroupTest only tests whether the element name is in the required set of names. It does not test that the content type matches. For this reason, it is always used as part of a CombinedNodeTest that also tests the type annotation.
Constructor Summary | |
---|---|
SubstitutionGroupTest(int head, IntHashSet group)
Constructor | |
SubstitutionGroupTest(int head, int[] members)
Constructor |
Method Summary | |
---|---|
boolean | equals(Object other) |
double | getDefaultPriority()
Determine the default priority of this node test when used on its own as a Pattern |
int | getHeadFingerprint()
Get the fingerprint of the head of the substitution group |
int | getNodeKindMask()
Get a mask indicating which kinds of nodes this NodeTest can match. |
int | getPrimitiveType()
Determine the types of nodes to which this pattern applies. |
IntHashSet | getRequiredNodeNames()
Get the set of node names allowed by this NodeTest. |
int | hashCode()
Returns a hash code value for the object. |
boolean | matches(int nodeKind, int nameCode, int annotation)
Test whether this node test is satisfied by a given node |
boolean | matches(TinyTree tree, int nodeNr)
Test whether this node test is satisfied by a given node on a TinyTree. |
boolean | matches(NodeInfo node)
Test whether this node test is satisfied by a given node. |
String | toString(NamePool pool) |
Parameters: head The name of the head element of the substitution group group An IntSet containing Integer values representing the fingerprints of element names included in the substitution group
Parameters: head The name of the head element of the substitution group members An array containing integer values representing the fingerprints of element names included in the substitution group
Returns: the fingerprint of the head of the substitution group
Returns: the type of node matched by this pattern. e.g. Type.ELEMENT or Type.TEXT
Parameters: nodeKind The type of node to be matched nameCode identifies the expanded name of the node to be matched
Parameters: tree the TinyTree containing the node nodeNr the number of the node within the TinyTree
Returns: true if the node matches the NodeTest, otherwise false
Parameters: node the node to be matched