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

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

 class JoiningNodeIterator
extends NodeIterator

This class is used to iterate the Nodes of a NodeList. Depending on the XmlCompareMode given at construction it automatically joins Nodes of according types by returning them as a DocumentFragment.

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

Field Summary
private  XmlCompareMode compareMode
          The mode of comparison.
private  Node next
          Buffer for lookahead or null.
 
Constructor Summary
JoiningNodeIterator(NodeList nodeList, XmlCompareMode mode)
          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

compareMode

private final XmlCompareMode compareMode
The mode of comparison.


next

private Node next
Buffer for lookahead or null.

Constructor Detail

JoiningNodeIterator

public JoiningNodeIterator(NodeList nodeList,
                           XmlCompareMode mode)
The constructor.

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

findNext

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

Overrides:
findNext in class NodeIterator
Returns:
the next element or null if done.


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