gov.llnl.babel.xml
Class ElementIterator

java.lang.Object
  extended by gov.llnl.babel.xml.ElementIterator
All Implemented Interfaces:
java.util.Iterator

public class ElementIterator
extends java.lang.Object
implements java.util.Iterator

This iterator will enumerate all of the direct children elements of the parent element with the specified name. The remove method is not supported.


Constructor Summary
ElementIterator(org.w3c.dom.Element parent, java.lang.String name)
          Create an iterator that will enumerate the children elements of the parent with the specified name.
 
Method Summary
 boolean hasNext()
          Return true if there is a next matching element and false otherwise.
 java.lang.Object next()
          Return the current element or null if there are no more matching elements.
 void remove()
          The remove method is not supported and will throw an unsupported operation exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementIterator

public ElementIterator(org.w3c.dom.Element parent,
                       java.lang.String name)
Create an iterator that will enumerate the children elements of the parent with the specified name.

Method Detail

hasNext

public boolean hasNext()
Return true if there is a next matching element and false otherwise.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Return the current element or null if there are no more matching elements. Advance the iterator to point to the next element.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
The remove method is not supported and will throw an unsupported operation exception.

Specified by:
remove in interface java.util.Iterator