net.sf.mmm.util.xml.base
Class NodeIterator

java.lang.Object
  extended by net.sf.mmm.util.collection.base.AbstractIterator<Node>
      extended by net.sf.mmm.util.xml.base.NodeIterator
All Implemented Interfaces:
Iterator<Node>
Direct Known Subclasses:
JoiningNodeIterator

public class NodeIterator
extends AbstractIterator<Node>

This class is used to iterate the Nodes of a NodeList.

Since:
1.0.2
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  int index
          The current index in the nodeList.
private  NodeList nodeList
          The NodeList to iterate.
private  int nodeListLength
          The length of the nodeList.
 
Constructor Summary
NodeIterator(NodeList nodeList)
          The constructor.
 
Method Summary
protected  Node findNext()
          This method tries to find the next element.
 
Methods inherited from class net.sf.mmm.util.collection.base.AbstractIterator
findFirst, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeList

private final NodeList nodeList
The NodeList to iterate.


nodeListLength

private final int nodeListLength
The length of the nodeList.


index

private int index
The current index in the nodeList.

Constructor Detail

NodeIterator

public NodeIterator(NodeList nodeList)
The constructor.

Parameters:
nodeList - is the NodeList to iterate.
Method Detail

findNext

protected Node findNext()
This method tries to find the next element.

Specified by:
findNext in class AbstractIterator<Node>
Returns:
the next element or null if done.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.