Package it.unibo.alchemist.model.actions
Class ToggleMolecule
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,java.io.Serializable
public class ToggleMolecule<T extends Object> extends AbstractAction<T>
Treats molecule as a switch:
if it is present, then it's removed from node;
otherwise, it is inserted in node with the provided concentration.
-
-
Constructor Summary
Constructors Constructor Description ToggleMolecule(Node<T> node, Molecule molecule, T concentration)
-
Method Summary
Modifier and Type Method Description ToggleMolecule<T>
cloneAction(Node<T> node, Reaction<T> reaction)
Unit
execute()
Toggles concentration. Context
getContext()
-
-
Method Detail
-
cloneAction
ToggleMolecule<T> cloneAction(Node<T> node, Reaction<T> reaction)
-
getContext
Context getContext()
-
-
-
-