org.eigenbase.runtime
Class RestartableCollectionIterator

java.lang.Object
  extended by 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

Field Summary
private  Collection collection
           
private  Iterator iterator
           
 
Constructor Summary
RestartableCollectionIterator(Collection collection)
           
 
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
 

Field Detail

collection

private final Collection collection

iterator

private Iterator iterator
Constructor Detail

RestartableCollectionIterator

public RestartableCollectionIterator(Collection collection)
Method Detail

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