edu.cmu.cs.coral.icf.plan_based.planners.pip
Class NodeExpansionChoiceIterator

java.lang.Object
  |
  +--edu.cmu.cs.coral.icf.plan_based.planners.pip.NodeExpansionChoiceIterator

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

Represents an iterator over node expansion choices which are generated on the fly.

Since:
ICF 0.0
Version:
$Id$

Field Summary
private  java.util.Iterator nodes
          the list of plan nodes that can be expanded
 
Constructor Summary
NodeExpansionChoiceIterator(java.util.Iterator nodes)
          Generates a new iterator over the possible choices of node to expand out of the given nodes.
NodeExpansionChoiceIterator(PlanNode node)
          Generates a new iterator containing the single node given
 
Method Summary
 boolean hasNext()
          Checks if there is a next element from this iterator.
 java.lang.Object next()
          Gets the next element from this iterator.
 void remove()
          Removes this element from the iterator's backing store.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

nodes

private java.util.Iterator nodes
the list of plan nodes that can be expanded
Since:
ICF 0.0
Constructor Detail

NodeExpansionChoiceIterator

public NodeExpansionChoiceIterator(PlanNode node)
Generates a new iterator containing the single node given
Parameters:
nodes - the node to expand
Since:
ICF 0.0

NodeExpansionChoiceIterator

public NodeExpansionChoiceIterator(java.util.Iterator nodes)
Generates a new iterator over the possible choices of node to expand out of the given nodes.
Parameters:
nodes - the nodes to consider expanding
Since:
ICF 0.0
Method Detail

hasNext

public boolean hasNext()
Checks if there is a next element from this iterator.
Specified by:
hasNext in interface java.util.Iterator
Returns:
true if and only if this iterator has another element
Since:
ICF 0.0

next

public java.lang.Object next()
Gets the next element from this iterator.
Specified by:
next in interface java.util.Iterator
Returns:
the next element of this iterator
Since:
ICF 0.0

remove

public void remove()
            throws java.lang.UnsupportedOperationException
Removes this element from the iterator's backing store.
Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - always
Since:
ICF 0.0