com.caucho.xpath.pattern
Class SingleNodeIterator

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

public class SingleNodeIterator
extends NodeIterator
implements org.w3c.dom.NodeList

Iterates through matching nodes.


Field Summary
protected  org.w3c.dom.Node _node
           
 
Fields inherited from class com.caucho.xpath.pattern.NodeIterator
_contextNode, _env, _position, _size, log
 
Constructor Summary
SingleNodeIterator(ExprEnvironment env, org.w3c.dom.Node node)
           
 
Method Summary
 java.lang.Object clone()
          clones the iterator
 int getLength()
          Returns the NodeList length.
 int getPosition()
          Returns the current position.
 boolean hasNext()
          True if there's more data.
 org.w3c.dom.Node item(int i)
          Returns the NodeList item.
 org.w3c.dom.Node nextNode()
          Returns the next node.
 
Methods inherited from class com.caucho.xpath.pattern.NodeIterator
copy, getContextNode, getContextPosition, getContextSize, getCurrentNode, getFunction, getOwnerDocument, getPositionIndex, getStylesheetEnv, getVar, next, 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

_node

protected org.w3c.dom.Node _node
Constructor Detail

SingleNodeIterator

public SingleNodeIterator(ExprEnvironment env,
                          org.w3c.dom.Node node)
Method Detail

getPosition

public int getPosition()
Returns the current position.


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

nextNode

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

Specified by:
nextNode in class NodeIterator

getLength

public int getLength()
Returns the NodeList length.

Specified by:
getLength in interface org.w3c.dom.NodeList

item

public org.w3c.dom.Node item(int i)
Returns the NodeList item.

Specified by:
item in interface org.w3c.dom.NodeList

clone

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

Specified by:
clone in class NodeIterator