com.partnersoft.data
Class SequentialMultiIterator

java.lang.Object
  extended by com.partnersoft.data.SequentialMultiIterator
All Implemented Interfaces:
MultiIterator, java.util.Iterator

public class SequentialMultiIterator
extends java.lang.Object
implements MultiIterator

An enumeration that traverses an ordered set of sub-enumerations. Each enumeration is completed before the next one is started.


Constructor Summary
SequentialMultiIterator()
          Creates a new SequentialMultiIterator
SequentialMultiIterator(java.util.Iterator a, java.util.Iterator b)
          Creates a new SequentialMultiIterator based on two enumerations
 
Method Summary
 void add(java.util.Iterator newEnum)
          Adds an enumeration to the end of the SequentialMultiIterator.
 boolean hasNext()
          Returns true if the enumeration contains more elements; false if its empty.
 java.lang.Object next()
          Returns the next element of the enumeration.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequentialMultiIterator

public SequentialMultiIterator()
Creates a new SequentialMultiIterator


SequentialMultiIterator

public SequentialMultiIterator(java.util.Iterator a,
                               java.util.Iterator b)
Creates a new SequentialMultiIterator based on two enumerations

Method Detail

add

public void add(java.util.Iterator newEnum)
Adds an enumeration to the end of the SequentialMultiIterator.

Specified by:
add in interface MultiIterator

hasNext

public boolean hasNext()
Returns true if the enumeration contains more elements; false if its empty.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Returns the next element of the enumeration. Calls to this method will enumerate successive elements.

Specified by:
next in interface java.util.Iterator
Throws:
java.util.NoSuchElementException - If no more elements exist.

remove

public void remove()
Specified by:
remove in interface java.util.Iterator