org.apache.xalan.xsltc.dom
Class SingletonIterator

java.lang.Object
  extended by org.apache.xml.dtm.ref.DTMAxisIteratorBase
      extended by org.apache.xalan.xsltc.dom.SingletonIterator
All Implemented Interfaces:
java.lang.Cloneable, DTMAxisIterator

public class SingletonIterator
extends DTMAxisIteratorBase


Field Summary
private  boolean _isConstant
           
private  int _node
           
 
Fields inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase
_includeSelf, _isRestartable, _last, _markedNode, _position, _startNode
 
Fields inherited from interface org.apache.xml.dtm.DTMAxisIterator
END
 
Constructor Summary
SingletonIterator()
           
SingletonIterator(int node)
           
SingletonIterator(int node, boolean constant)
           
 
Method Summary
 void gotoMark()
          Restores the current node remembered by setMark().
 int next()
          Get the next node in the iteration.
 DTMAxisIterator reset()
          Resets the iterator to the last start node.
 void setMark()
          Remembers the current node for the next call to gotoMark().
 DTMAxisIterator setStartNode(int node)
          Override the value of _node only when this object was constructed using the empty constructor.
 
Methods inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase
cloneIterator, getAxis, getLast, getNodeByPosition, getPosition, getStartNode, includeSelf, isDocOrdered, isReverse, resetPosition, returnNode, setRestartable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_node

private int _node

_isConstant

private final boolean _isConstant
Constructor Detail

SingletonIterator

public SingletonIterator()

SingletonIterator

public SingletonIterator(int node)

SingletonIterator

public SingletonIterator(int node,
                         boolean constant)
Method Detail

setStartNode

public DTMAxisIterator setStartNode(int node)
Override the value of _node only when this object was constructed using the empty constructor.

Parameters:
node - Sets the root of the iteration.
Returns:
A DTMAxisIterator set to the start of the iteration.

reset

public DTMAxisIterator reset()
Description copied from interface: DTMAxisIterator
Resets the iterator to the last start node.

Specified by:
reset in interface DTMAxisIterator
Overrides:
reset in class DTMAxisIteratorBase
Returns:
A DTMAxisIterator which has been reset to the start node, which may or may not be the same as this iterator.

next

public int next()
Description copied from interface: DTMAxisIterator
Get the next node in the iteration.

Returns:
The next node handle in the iteration, or END.

setMark

public void setMark()
Description copied from interface: DTMAxisIterator
Remembers the current node for the next call to gotoMark().


gotoMark

public void gotoMark()
Description copied from interface: DTMAxisIterator
Restores the current node remembered by setMark().