blog
Class WorldInProgress.UninstVarIterator

java.lang.Object
  extended by blog.WorldInProgress.UninstVarIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
WorldInProgress

public class WorldInProgress.UninstVarIterator
extends java.lang.Object
implements java.util.Iterator

Inner class for iterating over the list of uninstantiated variables. It is like an ordinary iterator, but has an extra method setValue for instantiating the variable returned by the last call to next.


Constructor Summary
WorldInProgress.UninstVarIterator()
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
          Always returns an object of class VarWithDistrib.
 void remove()
          The remove method is not supported, because the only way to remove a variable from the list of uninstantiated variables is to instantiate it.
 void setValue(java.lang.Object value)
          Instantiates the last variable returned by next to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorldInProgress.UninstVarIterator

public WorldInProgress.UninstVarIterator()
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Always returns an object of class VarWithDistrib.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
The remove method is not supported, because the only way to remove a variable from the list of uninstantiated variables is to instantiate it.

Specified by:
remove in interface java.util.Iterator

setValue

public void setValue(java.lang.Object value)
Instantiates the last variable returned by next to the given value. The variable must be supported by this partial world, or a fatal error will occur.

Throws:
java.lang.IllegalStateException - if next has not yet been called, or if setValue has already been called since the last call to next