org.apache.xml.dtm.ref
Class EmptyIterator
java.lang.Object
org.apache.xml.dtm.ref.EmptyIterator
- Cloneable, DTMAxisIterator
public final class EmptyIterator
extends java.lang.Object
DTM Empty Axis Iterator. The class is immutable
getLast
public final int getLast()
- getLast in interface DTMAxisIterator
- the number of nodes in this iterator. This may be an expensive
operation when called the first time.
getNodeByPosition
public final int getNodeByPosition(int position)
Return the node at the given position.
- getNodeByPosition in interface DTMAxisIterator
- The node at the given position.
getPosition
public final int getPosition()
- getPosition in interface DTMAxisIterator
- The position of the current node in the set, as defined by XPath.
getStartNode
public final int getStartNode()
Get start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
- getStartNode in interface DTMAxisIterator
- The root node of the iteration.
gotoMark
public final void gotoMark()
Restores the current node remembered by setMark().
- gotoMark in interface DTMAxisIterator
isReverse
public final boolean isReverse()
- isReverse in interface DTMAxisIterator
- true if this iterator has a reversed axis, else false.
next
public final int next()
Get the next node in the iteration.
- next in interface DTMAxisIterator
- The next node handle in the iteration, or END.
reset
public final DTMAxisIterator reset()
Resets the iterator to the last start node.
- reset in interface DTMAxisIterator
- A DTMAxisIterator, which may or may not be the same as this
iterator.
setMark
public final void setMark()
Remembers the current node for the next call to gotoMark().
- setMark in interface DTMAxisIterator
setStartNode
public final DTMAxisIterator setStartNode(int node)
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
- setStartNode in interface DTMAxisIterator
node
- Sets the root of the iteration.
- A DTMAxisIterator set to the start of the iteration.
Copyright © 2006 Apache XML Project. All Rights Reserved.