ToggleMolecule

open class ToggleMolecule<T>(node: Node<T>, molecule: Molecule, concentration: T) : AbstractAction<T> (source)

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.

Inheritors

Constructors

Link copied to clipboard
constructor(node: Node<T>, molecule: Molecule, concentration: T)

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): ToggleMolecule<T>
Link copied to clipboard
open override fun execute()

Toggles concentration.

Link copied to clipboard
open override fun getContext(): Context
Link copied to clipboard
@Nonnull
override fun getOutboundDependencies(): ListSet<out Dependency>
Link copied to clipboard
open override fun toString(): String