com.softwareag.tamino.db.api.objectModel.jdom
Class TJDOMElementIterator

java.lang.Object
  extended by com.softwareag.tamino.db.api.objectModel.jdom.TJDOMElementIterator

public class TJDOMElementIterator
extends java.lang.Object

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

Version:
$Revision: 1.1 $
Author:
Marcus Schreyer

Constructor Summary
TJDOMElementIterator(TXMLObjectIterator xmlObjectIterator)
          Initializes an iterator with a TXMLObjectIterator instance.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more JDOM Element instances.
 org.jdom.Element next()
          Returns the next JDOM 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

TJDOMElementIterator

public TJDOMElementIterator(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 JDOM Element instances. (In other words, returns true if next would return a JDOM Element instance rather than throwing an exception.)

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

next

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

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


Copyright (c) ${year.timestamp} Software AG. All Rights Reserved.