Package it.unibo.alchemist.core
Class ArrayIndexedPriorityQueue
-
- All Implemented Interfaces:
-
it.unibo.alchemist.core.Scheduler
public final class ArrayIndexedPriorityQueue<T> implements Scheduler<T>
This class implements the indexed priority queue through an Array.
-
-
Field Summary
Fields Modifier and Type Field Description public final List<Actionable<T>>
tree
-
Constructor Summary
Constructors Constructor Description ArrayIndexedPriorityQueue()
-
Method Summary
Modifier and Type Method Description List<Actionable<T>>
getTree()
Accessor for tree.substratum. void
addReaction(Actionable<T> reaction)
Should not be overridden. Actionable<T>
getNext()
Could be overridden. void
removeReaction(Actionable<T> reaction)
String
toString()
String representation, could be overridden. void
updateReaction(Actionable<T> reaction)
-
-
Method Detail
-
getTree
List<Actionable<T>> getTree()
Accessor for tree.substratum.
- Returns:
tree
-
addReaction
void addReaction(Actionable<T> reaction)
Should not be overridden.
- Parameters:
reaction
- the reaction to be added
-
getNext
Actionable<T> getNext()
Could be overridden.
- Returns:
next actionable to execute
-
removeReaction
void removeReaction(Actionable<T> reaction)
- Parameters:
reaction
- the reaction to be removed
-
toString
String toString()
String representation, could be overridden.
- Returns:
string representation of the queue
-
updateReaction
void updateReaction(Actionable<T> reaction)
- Parameters:
reaction
- the reaction which has changed
-
-
-
-