net.xfra.qizxopen.dm
Class UnionNodeTest
java.lang.Object
|
+--net.xfra.qizxopen.dm.UnionNodeTest
- All Implemented Interfaces:
- NodeTest
- public class UnionNodeTest
- extends java.lang.Object
- implements NodeTest
Logical OR of two NodeTests.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
t1
public NodeTest t1
t2
public NodeTest t2
UnionNodeTest
public UnionNodeTest(NodeTest t1,
NodeTest t2)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getNodeKind
public int getNodeKind()
- Description copied from interface:
NodeTest
- Returns the node kind (Node.ELEMENT, Node.TEXT etc) or -1 if not simple.
- Specified by:
getNodeKind
in interface NodeTest
staticallyCheckable
public boolean staticallyCheckable()
- Description copied from interface:
NodeTest
- Returns true for simple node test (node kind only).
- Specified by:
staticallyCheckable
in interface NodeTest
accepts
public boolean accepts(int nodeKind,
QName nodeName)
- Specified by:
accepts
in interface NodeTest
- Returns:
- true if node matched. A null name is always accepted.
needsNode
public boolean needsNode()
- Specified by:
needsNode
in interface NodeTest
- Returns:
- true if the node itself is necessary for checking (not only the kind
and name). Allows optimization (avoids building a Node just for testing).
Returns true for extended tests like DocumentTest.
accepts
public boolean accepts(Node node)
- Specified by:
accepts
in interface NodeTest
- Returns:
- true if node matched. Used for extended tests like DocumentTest.