org.extex.framework.configuration.impl
Class MultiConfigurationIterator

java.lang.Object
  extended by org.extex.framework.configuration.impl.MultiConfigurationIterator
All Implemented Interfaces:
java.util.Iterator<Configuration>

public class MultiConfigurationIterator
extends java.lang.Object
implements java.util.Iterator<Configuration>

This class provides an Iterator over multiple Configurations.

Version:
$Revision: 5455 $
Author:
Gerd Neugebauer

Constructor Summary
MultiConfigurationIterator(Configuration[] theConfigs, java.lang.String theKey)
          Creates a new object.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 Configuration next()
          Returns the next element in the iteration.
 void remove()
          This operation is not supported and leads to an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiConfigurationIterator

public MultiConfigurationIterator(Configuration[] theConfigs,
                                  java.lang.String theKey)
                           throws ConfigurationException
Creates a new object.

Parameters:
theConfigs - the array of configurations to combine
theKey - the name of the sub-configuration
Throws:
ConfigurationException - in case of an error in a sub-iterator
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Specified by:
hasNext in interface java.util.Iterator<Configuration>
Returns:
true if the iterator has more elements.
See Also:
Iterator.hasNext()

next

public Configuration next()
Returns the next element in the iteration.

Specified by:
next in interface java.util.Iterator<Configuration>
Returns:
the next element in the iteration.
Throws:
java.util.NoSuchElementException - iteration has no more elements.
See Also:
Iterator.next()

remove

public void remove()
This operation is not supported and leads to an exception.

Specified by:
remove in interface java.util.Iterator<Configuration>
See Also:
Iterator.remove()