com.caucho.xpath.pattern
Class UniqueIterator

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

public class UniqueIterator
extends NodeIterator

The unique iterator.


Field Summary
 
Fields inherited from class com.caucho.xpath.pattern.NodeIterator
_contextNode, _env, _position, _size, log
 
Constructor Summary
UniqueIterator(ExprEnvironment env)
          Zero arg constructor.
UniqueIterator(ExprEnvironment env, NodeIterator baseIterator)
          Creates a merge iterator with a given base.
 
Method Summary
 java.lang.Object clone()
          Returns a clone
 boolean hasNext()
          True if there are more nodes.
 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
 

Constructor Detail

UniqueIterator

public UniqueIterator(ExprEnvironment env)
Zero arg constructor.


UniqueIterator

public UniqueIterator(ExprEnvironment env,
                      NodeIterator baseIterator)
               throws XPathException
Creates a merge iterator with a given base.

Throws:
XPathException
Method Detail

hasNext

public boolean hasNext()
True if there are more nodes.

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()
                          throws XPathException
Returns the next node.

Specified by:
nextNode in class NodeIterator
Throws:
XPathException

clone

public java.lang.Object clone()
Returns a clone

Specified by:
clone in class NodeIterator