Package org.jboss.util.collection
Class CompoundIterator
- java.lang.Object
-
- org.jboss.util.collection.CompoundIterator
-
- All Implemented Interfaces:
java.util.Iterator
public class CompoundIterator extends java.lang.Object implements java.util.IteratorA compound iterator, which iterates over all of the elements in the given iterators.- Version:
- $Revision$
-
-
Constructor Summary
Constructors Constructor Description CompoundIterator(java.util.Iterator[] iters)Construct a CompoundIterator over the given array of iterators.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Check if there are more elements.java.lang.Objectnext()Return the next element from the current iterator.voidremove()Remove the current element from the current iterator.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Check if there are more elements.- Specified by:
hasNextin interfacejava.util.Iterator- Returns:
- True if there are more elements.
-
next
public java.lang.Object next()
Return the next element from the current iterator.- Specified by:
nextin interfacejava.util.Iterator- Returns:
- The next element from the current iterator.
- Throws:
java.util.NoSuchElementException- There are no more elements.
-
remove
public void remove()
Remove the current element from the current iterator.- Specified by:
removein interfacejava.util.Iterator- Throws:
java.lang.IllegalStateExceptionjava.lang.UnsupportedOperationException
-
-