com.icl.saxon.tinytree

Class SiblingEnumeration

final class SiblingEnumeration extends Object implements AxisEnumeration

This class supports both the child:: and following-sibling:: axes, which are identical except for the route to the first candidate node. It enumerates either the children or the following siblings of the specified node. In the case of children, the specified node must always be a node that has children: to ensure this, construct the enumeration using NodeInfo#getEnumeration()
Field Summary
TinyDocumentImpldocument
booleangetChildren
intlast
intnextNodeNr
TinyNodeImplparentNode
TinyNodeImplstartNode
NodeTesttest
Constructor Summary
protected SiblingEnumeration(TinyDocumentImpl doc, TinyNodeImpl node, NodeTest nodeTest, boolean getChildren)
Method Summary
intgetLastPosition()
Get the last position, that is the number of nodes in the enumeration
booleanhasMoreElements()
booleanisPeer()
booleanisReverseSorted()
booleanisSorted()
NodeInfonextElement()

Field Detail

document

TinyDocumentImpl document

getChildren

boolean getChildren

last

int last

nextNodeNr

int nextNodeNr

parentNode

TinyNodeImpl parentNode

startNode

TinyNodeImpl startNode

test

NodeTest test

Constructor Detail

SiblingEnumeration

protected SiblingEnumeration(TinyDocumentImpl doc, TinyNodeImpl node, NodeTest nodeTest, boolean getChildren)

Method Detail

getLastPosition

public int getLastPosition()
Get the last position, that is the number of nodes in the enumeration

hasMoreElements

public boolean hasMoreElements()

isPeer

public boolean isPeer()

isReverseSorted

public boolean isReverseSorted()

isSorted

public boolean isSorted()

nextElement

public NodeInfo nextElement()