lapisx.iterator
Class ConcatIterator
java.lang.Object
lapisx.iterator.ConcatIterator
- All Implemented Interfaces:
- Iterator
- public class ConcatIterator
- extends Object
- implements Iterator
Concatenates two or more Iterators.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConcatIterator
public ConcatIterator(Iterator g1,
Iterator g2)
- Make a concatenation of two iterators.
- Parameters:
g1
- First iteratorg2
- Second iterator
ConcatIterator
public ConcatIterator(Collection iterators)
- Make a concatenation of a collection of iterators.
- Parameters:
iterators
- collection of iterators to concatenate
- Throws:
ClassCastException
- if the first element of iterators doesn't implement Iterator
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
next
public Object next()
- Specified by:
next
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator