com.partnersoft.data
Class SerialMultiIterator<T>

java.lang.Object
  extended by com.partnersoft.data.SerialMultiIterator<T>
All Implemented Interfaces:
MultiIterator<T>, java.util.Iterator<T>

public class SerialMultiIterator<T>
extends java.lang.Object
implements MultiIterator<T>

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

Copyright 2008 Partner Software, Inc.

Version:
$Id: SerialMultiIterator.java 2013 2009-08-10 03:29:31Z paul $
Author:
Paul Reavis

Constructor Summary
SerialMultiIterator()
          Creates a new, empty SerialMultiIterator.
SerialMultiIterator(java.util.Iterator<T>... iterators)
          Creates a new SerialMultiIterator based on the given sub-iterators.
SerialMultiIterator(java.util.List<java.util.Iterator<T>> iterators)
          Creates a new SerialMultiIterator based on the given sub-iterators.
 
Method Summary
 void add(java.util.Iterator<T> newEnum)
          Adds an enumeration to the end of the multienumeration.
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialMultiIterator

public SerialMultiIterator()
Creates a new, empty SerialMultiIterator.


SerialMultiIterator

public SerialMultiIterator(java.util.Iterator<T>... iterators)
Creates a new SerialMultiIterator based on the given sub-iterators.


SerialMultiIterator

public SerialMultiIterator(java.util.List<java.util.Iterator<T>> iterators)
Creates a new SerialMultiIterator based on the given sub-iterators.

Method Detail

add

public void add(java.util.Iterator<T> newEnum)
Description copied from interface: MultiIterator
Adds an enumeration to the end of the multienumeration.

Specified by:
add in interface MultiIterator<T>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

remove

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