xacute.quilt
Class NameTest

java.lang.Object
  |
  +--xacute.quilt.NodeTest
        |
        +--xacute.quilt.NameTest
All Implemented Interfaces:
NodeTest

public class NameTest
extends NodeTest

This class implements a n XPath name-test, which returns all the nodes with type equal to the principal type of the axis and with name given by the name-test.


Constructor Summary
NameTest()
          Constructor for an empty name-test.
NameTest(java.lang.String name)
          Constructor for a non-empty name-test.
 
Method Summary
 boolean isTrue(Node n, int axis)
          Tests if a NodeTest is verified.
 java.lang.String pprint()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameTest

public NameTest()
Constructor for an empty name-test.

NameTest

public NameTest(java.lang.String name)
Constructor for a non-empty name-test.
Method Detail

pprint

public java.lang.String pprint()
Overrides:
pprint in class NodeTest

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isTrue

public boolean isTrue(Node n,
                      int axis)
Description copied from class: NodeTest
Tests if a NodeTest is verified.
Overrides:
isTrue in class NodeTest
Following copied from class: xacute.quilt.NodeTest
Parameters:
n - the node to test
axis - a constant representing the axis-specifier (this constant is needed for a nametest)