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

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

public final class XMLNodeIterator
extends Object
implements IterableIterator<Node>

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


Field Summary
private  Node next
          Store the next node
 
Constructor Summary
XMLNodeIterator(Node first)
          Constructor with first element to iterate over.
 
Method Summary
 boolean hasNext()
          Check if the next node is defined.
 Iterator<Node> iterator()
          Iterator 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

next

private Node next
Store the next node

Constructor Detail

XMLNodeIterator

public XMLNodeIterator(Node first)
Constructor with first element to iterate over.

Parameters:
first - first child of parent node.
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()
Iterator interface adapter - clone.

Specified by:
iterator in interface Iterable<Node>

Release 0.4.0 (2011-09-20_1324)