com.caucho.xpath.pattern
Class NodeListIterator

java.lang.Object
  extended by com.caucho.xpath.pattern.NodeIterator
      extended by com.caucho.xpath.pattern.NodeListIterator
All Implemented Interfaces:
ExprEnvironment, java.util.Iterator<org.w3c.dom.Node>

public class NodeListIterator
extends NodeIterator

Iterates through matching nodes.


Field Summary
protected  org.w3c.dom.NodeList _list
           
protected  int _position
           
 
Fields inherited from class com.caucho.xpath.pattern.NodeIterator
_contextNode, _env, _size, log
 
Constructor Summary
NodeListIterator(ExprEnvironment env, org.w3c.dom.NodeList list)
           
 
Method Summary
 java.lang.Object clone()
          clones the iterator
 int getContextPosition()
          Returns the current position.
 int getContextSize()
          Returns the current position.
 boolean hasNext()
          True if there's more data.
 org.w3c.dom.Node next()
          Returns the next node.
 org.w3c.dom.Node nextNode()
          Returns the next node.
 
Methods inherited from class com.caucho.xpath.pattern.NodeIterator
copy, getContextNode, getCurrentNode, getFunction, getOwnerDocument, getPositionIndex, getStylesheetEnv, getVar, nextSelectedNode, remove, setContextNode, setMorePositions, stringValue, systemProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_list

protected org.w3c.dom.NodeList _list

_position

protected int _position
Constructor Detail

NodeListIterator

public NodeListIterator(ExprEnvironment env,
                        org.w3c.dom.NodeList list)
Method Detail

getContextPosition

public int getContextPosition()
Returns the current position.

Specified by:
getContextPosition in interface ExprEnvironment
Overrides:
getContextPosition in class NodeIterator

getContextSize

public int getContextSize()
Returns the current position.

Specified by:
getContextSize in interface ExprEnvironment
Overrides:
getContextSize in class NodeIterator

hasNext

public boolean hasNext()
True if there's more data.

Specified by:
hasNext in interface java.util.Iterator<org.w3c.dom.Node>
Specified by:
hasNext in class NodeIterator

next

public org.w3c.dom.Node next()
Returns the next node.

Specified by:
next in interface java.util.Iterator<org.w3c.dom.Node>
Overrides:
next in class NodeIterator

nextNode

public org.w3c.dom.Node nextNode()
Returns the next node.

Specified by:
nextNode in class NodeIterator

clone

public java.lang.Object clone()
clones the iterator

Specified by:
clone in class NodeIterator