if (currentIterator == null) {
if( iterators.length==0 ) {
currentIterator = EmptyIterator.INSTANCE;
}
else {
currentIterator = iterators[0];
}
// set last used iterator here, in case the user calls remove
// before calling hasNext() or next() (although they shouldn't)
lastUsedIterator = currentIterator;
}
while (! currentIterator.hasNext() && currentIteratorIndex < iterators.length - 1) {
currentIteratorIndex++;
currentIterator = iterators[currentIteratorIndex];
}