uchicago.src.sim.engine
Class ActionQueue
java.lang.Object
uchicago.src.sim.engine.ActionQueue
public class ActionQueue
- extends java.lang.Object
Priority Queue for Action objects.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ActionQueue
public ActionQueue()
ActionQueue
public ActionQueue(int size)
voidAction
public boolean voidAction(BasicAction action)
- Find the specified Action in the queue and void it. Voiding means
replace that action with an empty action that does nothing.
- Returns:
- returns true if the action is found and voided, false if
this ActionQueue does not contain the specified BasicAction.
insert
public void insert(BasicAction action)
- Insert the specified action into the heap. If heap order is being
maintained, that is, it is not already invalidated, percolate action
up as needed.
peekMin
public BasicAction peekMin()
popMin
public BasicAction popMin()
toss
public void toss(BasicAction action)
clear
public void clear()
fixHeap
public void fixHeap()
isEmpty
public boolean isEmpty()
size
public int size()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object