public class CompoundIterator extends Object implements Iterator
| Modifier and Type | Field and Description |
|---|---|
protected int |
index
The index of the current iterator.
|
protected Iterator[] |
iters
The array of iterators to iterate over.
|
| Constructor and Description |
|---|
CompoundIterator(Iterator[] iters)
Construct a CompoundIterator over the given array of iterators.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Check if there are more elements.
|
Object |
next()
Return the next element from the current iterator.
|
void |
remove()
Remove the current element from the current iterator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected final Iterator[] iters
protected int index
public CompoundIterator(Iterator[] iters)
iters - Array of iterators to iterate over.IllegalArgumentException - Array is public boolean hasNext()
public Object next()
next in interface IteratorNoSuchElementException - There are no more elements.public void remove()
remove in interface IteratorIllegalStateExceptionUnsupportedOperationExceptionCopyright © 2024 JBoss by Red Hat. All rights reserved.