org.codehaus.janino.util

Class MultiIterator

public class MultiIterator extends Object implements Iterator

An java.util.Iterator that traverses a java.util.Collection of java.util.Iterators.
Constructor Summary
MultiIterator(Iterator[] iterators)
MultiIterator(Collection[] collections)
MultiIterator(Object[][] arrays)
MultiIterator(Collection collection)
MultiIterator(Iterator iterator)
MultiIterator(Object[] array)
MultiIterator(Object object, Collection collection)
Iterates over the given Collection, prepended with the given Object.
MultiIterator(Collection collection, Object object)
Iterates over the given Collection, appended with the given Object.
MultiIterator(Object prefix, Iterator iterator)
Iterates over the given Iterator, prepended with the given prefix.
MultiIterator(Iterator iterator, Object suffix)
Iterates over the given Iterator, appended with the given suffix.
Method Summary
booleanhasNext()
Objectnext()
voidremove()

Constructor Detail

MultiIterator

public MultiIterator(Iterator[] iterators)

Parameters: iterators An array of Iterators

MultiIterator

public MultiIterator(Collection[] 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 collection)
Iterates over the given Collection, prepended with the given Object.

MultiIterator

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

MultiIterator

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

MultiIterator

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

Method Detail

hasNext

public boolean hasNext()

next

public Object next()

remove

public void remove()