Package it.unibo.alchemist.core
Interface Scheduler
-
- All Implemented Interfaces:
public interface Scheduler<T>
The type which describes the concentration of a molecule This interface is meant to be implemented by the data structure(s) which must manage the reactions.
-
-
Method Summary
Modifier and Type Method Description abstract void
addReaction(Actionable<T> reaction)
Adds a reaction to the data structure. abstract Actionable<T>
getNext()
Allows to access the next reaction to be executed. abstract void
removeReaction(Actionable<T> reaction)
Removes a reaction from the structure. abstract void
updateReaction(Actionable<T> reaction)
Notifies the structure that the reaction r has changed. -
-
Method Detail
-
addReaction
abstract void addReaction(Actionable<T> reaction)
Adds a reaction to the data structure.
- Parameters:
reaction
- the reaction to be added
-
getNext
abstract Actionable<T> getNext()
Allows to access the next reaction to be executed.
- Returns:
the next reaction to be executed
-
removeReaction
abstract void removeReaction(Actionable<T> reaction)
Removes a reaction from the structure. If the reaction is not present, nothing is done and an Exception is thrown.
- Parameters:
reaction
- the reaction to be removed
-
updateReaction
abstract void updateReaction(Actionable<T> reaction)
Notifies the structure that the reaction r has changed. The whole structure will be rearranged to ensure consistency.
- Parameters:
reaction
- the reaction which has changed
-
-
-
-