net.mtu.eggplant.xml
Class NodelistElementCollectionAdapter

java.lang.Object
  extended by net.mtu.eggplant.xml.NodelistElementCollectionAdapter
All Implemented Interfaces:
Iterable<Element>, Iterator<Element>

public final class NodelistElementCollectionAdapter
extends Object
implements Iterator<Element>, Iterable<Element>

An Iterable for Elements in a NodeList.


Constructor Summary
NodelistElementCollectionAdapter(NodeList nodelist)
           
 
Method Summary
 List<Element> asList()
          Walks the iterator and converts to a LinkedList.
 boolean hasNext()
           
 Iterator<Element> iterator()
           
 Element next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodelistElementCollectionAdapter

public NodelistElementCollectionAdapter(NodeList nodelist)
Method Detail

iterator

public Iterator<Element> iterator()
Specified by:
iterator in interface Iterable<Element>

asList

public List<Element> asList()
Walks the iterator and converts to a LinkedList.


hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Element>

next

public Element next()
Specified by:
next in interface Iterator<Element>

remove

public void remove()
Specified by:
remove in interface Iterator<Element>