edu.isi.stella.javalib
Class ConsIterator

java.lang.Object
  extended by edu.isi.stella.javalib.ConsIterator
All Implemented Interfaces:
java.util.Iterator

public class ConsIterator
extends java.lang.Object
implements java.util.Iterator

An Iterator for Stells Conses. This class allows iteration over a Stella Cons using the java.util.Iterator interface.


Field Summary
protected  Cons cons
           
 
Constructor Summary
ConsIterator(Cons theCons)
          Creates a new Iterator that will range over the values in the Stella Cons.
 
Method Summary
 boolean hasNext()
          Tests if more elements are available.
 java.lang.Object next()
          Returns the next Stella_Object contained in the Cons.
 void remove()
          Remove is unsupported for ConsIterators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cons

protected Cons cons
Constructor Detail

ConsIterator

public ConsIterator(Cons theCons)
Creates a new Iterator that will range over the values in the Stella Cons.

Parameters:
theCons - An instance of a Stella Cons.
Method Detail

hasNext

public boolean hasNext()
Tests if more elements are available.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if at least one more element is available.

next

public java.lang.Object next()
Returns the next Stella_Object contained in the Cons.

Specified by:
next in interface java.util.Iterator
Returns:
the next Stella_Object in the Cons.

remove

public void remove()
Remove is unsupported for ConsIterators.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException