org.eigenbase.runtime
Class RestartableCollectionIterator
java.lang.Object
org.eigenbase.runtime.RestartableCollectionIterator
- All Implemented Interfaces:
- Iterator, RestartableIterator
public class RestartableCollectionIterator
- extends Object
- implements RestartableIterator
RestartableCollectionIterator
implements the RestartableIterator
interface in terms of an underlying Collection
.
TODO jvs 21-Mar-2006: This class is no longer used except by Saffron, so
we should move it to Saffron.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/runtime/RestartableCollectionIterator.java#10 $
- Author:
- John V. Sichi
Method Summary |
boolean |
hasNext()
|
Object |
next()
|
void |
remove()
|
void |
restart()
Restarts this iterator, so that a subsequent call to next() returns the
first element in the collection being iterated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
collection
private final Collection collection
iterator
private Iterator iterator
RestartableCollectionIterator
public RestartableCollectionIterator(Collection collection)
next
public Object next()
- Specified by:
next
in interface Iterator
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator
restart
public void restart()
- Description copied from interface:
RestartableIterator
- Restarts this iterator, so that a subsequent call to next() returns the
first element in the collection being iterated.
- Specified by:
restart
in interface RestartableIterator