jxUtil 0.6

org.sourceforge.jxutil
Class MultiIterator

java.lang.Object
  |
  +--org.sourceforge.jxutil.MultiIterator
All Implemented Interfaces:
Iterator

public final class MultiIterator
extends Object
implements Iterator

An iterator implemented over several other iterators.

Author:
Keve Müller

Field Summary
private  int cur
          The current iterator's index in the array of iterators.
private  Iterator[] iters
          The array of iterators.
 
Constructor Summary
MultiIterator(Iterator[] iters)
           
MultiIterator(Iterator one, Iterator two)
           
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cur

private int cur
The current iterator's index in the array of iterators.


iters

private final Iterator[] iters
The array of iterators.

Constructor Detail

MultiIterator

public MultiIterator(Iterator[] iters)

MultiIterator

public MultiIterator(Iterator one,
                     Iterator two)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
            throws NoSuchElementException
Specified by:
next in interface Iterator
NoSuchElementException

remove

public void remove()
Specified by:
remove in interface Iterator

jxUtil 0.6

Copyright © 2001,2002 Keve Müller, et al.; see LICENSE file for details.