com.icl.saxon.tinytree

Class DescendantEnumeration

Implemented Interfaces:
AxisEnumeration, LastPositionFinder, NodeEnumeration

(package private) final class DescendantEnumeration
extends Object
implements AxisEnumeration

This class supports both the descendant:: and descendant-or-self:: axes, which are identical except for the route to the first candidate node. It enumerates descendants of the specified node. The calling code must ensure that the start node is not an attribute or namespace node.

Field Summary

(package private) TinyDocumentImpl
document
(package private) boolean
includeSelf
(package private) int
last
(package private) int
nextNodeNr
(package private) TinyNodeImpl
parentNode
(package private) int
startDepth
(package private) TinyNodeImpl
startNode
(package private) NodeTest
test

Constructor Summary

DescendantEnumeration(TinyDocumentImpl doc, TinyNodeImpl node, NodeTest nodeTest, boolean includeSelf)

Method Summary

int
getLastPosition()
Get the last position, that is the number of nodes in the enumeration
boolean
hasMoreElements()
boolean
isPeer()
boolean
isReverseSorted()
boolean
isSorted()
NodeInfo
nextElement()

Field Details

document

(package private)  TinyDocumentImpl document

includeSelf

(package private)  boolean includeSelf

last

(package private)  int last

nextNodeNr

(package private)  int nextNodeNr

parentNode

(package private)  TinyNodeImpl parentNode

startDepth

(package private)  int startDepth

startNode

(package private)  TinyNodeImpl startNode

test

(package private)  NodeTest test

Constructor Details

DescendantEnumeration

protected DescendantEnumeration(TinyDocumentImpl doc,
                                TinyNodeImpl node,
                                NodeTest nodeTest,
                                boolean includeSelf)

Method Details

getLastPosition

public int getLastPosition()
Get the last position, that is the number of nodes in the enumeration
Specified by:
getLastPosition in interface AxisEnumeration
getLastPosition in interface LastPositionFinder

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface AxisEnumeration
hasMoreElements in interface NodeEnumeration

isPeer

public boolean isPeer()
Specified by:
isPeer in interface NodeEnumeration

isReverseSorted

public boolean isReverseSorted()
Specified by:
isReverseSorted in interface NodeEnumeration

isSorted

public boolean isSorted()
Specified by:
isSorted in interface NodeEnumeration

nextElement

public NodeInfo nextElement()
Specified by:
nextElement in interface AxisEnumeration
nextElement in interface NodeEnumeration