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

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

public class Decision
extends java.lang.Object

Represents a decision made along with possible alternatives.

Since:
ICF 0.0
Version:
$Id$

Field Summary
private  ChangeTracker changeTracker
          the change tracker to track changes made to implement this decision
private  java.util.Iterator choices
          the remaining choices left
private  Choice curChoice
          the choice that was selected
 
Constructor Summary
Decision(java.util.Iterator choices)
          Constructs a decision with the given list of possible choices that can be made.
 
Method Summary
 ChangeTracker accessChangeTracker()
          Access the change tracker corresponding to the current choice, the change tracker can be modified directly.
 boolean alternativesLeft()
          Checks whether there are other options left for this decision.
 Choice getCurChoice()
          Gets the currently selected Choice
 Choice tryNextAlternative()
          Makes the next alternative the currently selected alternative.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

curChoice

private Choice curChoice
the choice that was selected
Since:
ICF 0.0

changeTracker

private ChangeTracker changeTracker
the change tracker to track changes made to implement this decision
Since:
ICF 0.0

choices

private java.util.Iterator choices
the remaining choices left
Since:
ICF 0.0
Constructor Detail

Decision

public Decision(java.util.Iterator choices)
Constructs a decision with the given list of possible choices that can be made.
Parameters:
choices - the possible options that could be picked
Since:
ICF 0.0
Method Detail

tryNextAlternative

public Choice tryNextAlternative()
Makes the next alternative the currently selected alternative.
Since:
ICF 0.0

alternativesLeft

public boolean alternativesLeft()
Checks whether there are other options left for this decision.
Returns:
true if and only if there are more choices left for this decision
Since:
ICF 0.0

getCurChoice

public Choice getCurChoice()
Gets the currently selected Choice
Returns:
the Choice that was selected
Since:
ICF 0.0

accessChangeTracker

public ChangeTracker accessChangeTracker()
Access the change tracker corresponding to the current choice, the change tracker can be modified directly.
Returns:
the change tracker for this choice
Since:
ICF 0.0