janino.net

org.codehaus.janino.util
Class MultiIterator<T>

java.lang.Object
  extended by org.codehaus.janino.util.MultiIterator<T>
Type Parameters:
T - The element type of the iterator
All Implemented Interfaces:
Iterator<T>

public class MultiIterator<T>
extends Object
implements Iterator<T>

An Iterator that traverses a Collection of Iterators.


Constructor Summary
MultiIterator(Collection<?> collection)
           
MultiIterator(Collection<T>[] collections)
           
MultiIterator(Collection<T> collection, Object object)
          Iterates over the given Collection, appended with the given Object.
MultiIterator(Iterator<?> iterator)
           
MultiIterator(Iterator<T>[] iterators)
           
MultiIterator(Iterator<T> iterator, Object suffix)
          Iterates over the given Iterator, appended with the given suffix.
MultiIterator(Object[] array)
           
MultiIterator(Object[][] arrays)
           
MultiIterator(Object object, Collection<T> collection)
          Iterates over the given Collection, prepended with the given Object.
MultiIterator(Object prefix, Iterator<T> iterator)
          Iterates over the given Iterator, prepended with the given prefix.
 
Method Summary
 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

MultiIterator

public MultiIterator(Iterator<T>[] iterators)
Parameters:
iterators - An array of Iterators

MultiIterator

public MultiIterator(Collection<T>[] collections)
Parameters:
collections - An array of Collections

MultiIterator

public MultiIterator(Object[][] arrays)
Parameters:
arrays - An array of arrays

MultiIterator

public MultiIterator(Collection<?> collection)
Parameters:
collection - A Collection of Collections, Iterators and/or arrays

MultiIterator

public MultiIterator(Iterator<?> iterator)
Parameters:
iterator - An iterator over Collections, Iterators and/or arrays

MultiIterator

public MultiIterator(Object[] array)
Parameters:
array - An array of Collections, Iterators and/or arrays

MultiIterator

public MultiIterator(Object object,
                     Collection<T> collection)
Iterates over the given Collection, prepended with the given Object.


MultiIterator

public MultiIterator(Collection<T> collection,
                     Object object)
Iterates over the given Collection, appended with the given Object.


MultiIterator

public MultiIterator(Object prefix,
                     Iterator<T> iterator)
Iterates over the given Iterator, prepended with the given prefix.


MultiIterator

public MultiIterator(Iterator<T> iterator,
                     Object suffix)
Iterates over the given Iterator, appended with the given suffix.

Method Detail

hasNext

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

next

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

remove

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

janino.net