de.lmu.ifi.dbs.elki.utilities.xml
Class XMLNodeListIterator

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.xml.XMLNodeListIterator
All Implemented Interfaces:
IterableIterator<Node>, Iterable<Node>, Iterator<Node>

public final class XMLNodeListIterator
extends Object
implements IterableIterator<Node>

Simple adapter class to iterate over a DOM tree nodes children.


Field Summary
private  int index
          Store the next node
private  NodeList nodelist
          The NodeList to iterate over.
 
Constructor Summary
XMLNodeListIterator(NodeList nl)
          Constructor with first element to iterate over.
 
Method Summary
 boolean hasNext()
          Check if the next node is defined.
 Iterator<Node> iterator()
          Iterable interface adapter - clone.
 Node next()
          Return next and advance iterator.
 void remove()
          Removal: unsupported operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

private int index
Store the next node


nodelist

private NodeList nodelist
The NodeList to iterate over.

Constructor Detail

XMLNodeListIterator

public XMLNodeListIterator(NodeList nl)
Constructor with first element to iterate over.

Parameters:
nl - NodeList to iterate over.
Method Detail

hasNext

public boolean hasNext()
Check if the next node is defined.

Specified by:
hasNext in interface Iterator<Node>

next

public Node next()
Return next and advance iterator.

Specified by:
next in interface Iterator<Node>

remove

public void remove()
Removal: unsupported operation.

Specified by:
remove in interface Iterator<Node>

iterator

public Iterator<Node> iterator()
Iterable interface adapter - clone.

Specified by:
iterator in interface Iterable<Node>

Release 0.4.0 (2011-09-20_1324)