com.softwareag.tamino.db.api.objectModel.dom
Class TDOMElementIterator

java.lang.Object
  extended by com.softwareag.tamino.db.api.objectModel.dom.TDOMElementIterator

public class TDOMElementIterator
extends java.lang.Object

TDOMElementIterator is a convenience class. It provides a simple unidirectional iterator for iterating typesafe over DOM Element instances. You can create a TDOMElementIterator instance with a TXMLObjectIterator for TXMLObject instances of a DOM object model.

Version:
$Revision: 1.6 $
Author:
Marcus Schreyer

Constructor Summary
TDOMElementIterator(TXMLObjectIterator xmlObjectIterator)
          Initializes an iterator with a TXMLObjectIterator instance.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more DOM Element instances.
 org.w3c.dom.Element next()
          Returns the next DOM Element instance in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TDOMElementIterator

public TDOMElementIterator(TXMLObjectIterator xmlObjectIterator)
Initializes an iterator with a TXMLObjectIterator instance.

Parameters:
xmlObjectIterator - a TXMLObjectIterator instance.
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more DOM Element instances. (In other words, returns true if next would return a DOM Element instance rather than throwing an exception.)

Returns:
true if the iterator has more DOM Element instances.

next

public org.w3c.dom.Element next()
                         throws TNoSuchXMLObjectException,
                                TIteratorException
Returns the next DOM Element instance in the list. This method may be called repeatedly to iterate through the list.

Returns:
The next DOM Element instance.
Throws:
java.util.NoSuchElementException - if iteration has no more DOM Element instances.
TIteratorException - signals an error while attempting to return the next DOM Element instance.
TNoSuchXMLObjectException


Copyright (c) 2013 Software AG. All Rights Reserved.