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

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

public class ChangeTracker
extends java.lang.Object

Tracks changes over time, used in PIP for tracking changes to the plan.

Since:
ICF 0.0
Version:
$Id$

Field Summary
private  java.util.Vector changes
          Tracks the changes that need remembered.
 
Constructor Summary
ChangeTracker()
          Constructs an ChangeTracker containing no changes.
 
Method Summary
 void addChange(Change change)
          Adds the specified change to the ChangeTracker.
 void applyAll()
          Apply all the changes in the change interator.
 java.util.ListIterator getChanges()
          Gets all the changes this ChangeTracker was asked to remember.
 void undoAll()
          Undo all the changes in the change iterator.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

changes

private java.util.Vector changes
Tracks the changes that need remembered.
Since:
ICF 0.0
Constructor Detail

ChangeTracker

public ChangeTracker()
Constructs an ChangeTracker containing no changes.
Since:
ICF 0.0
Method Detail

addChange

public void addChange(Change change)
Adds the specified change to the ChangeTracker.
Parameters:
change - the change to remember, a null value results in a no-op
Since:
ICF 0.0

getChanges

public java.util.ListIterator getChanges()
Gets all the changes this ChangeTracker was asked to remember.
Returns:
an iterator over all the changes in FIFO order
Since:
ICF 0.0

undoAll

public void undoAll()
Undo all the changes in the change iterator.
Since:
ICF 0.0

applyAll

public void applyAll()
Apply all the changes in the change interator.
Since:
ICF 0.0