Class BiochemicalReactionBuilder
-
- All Implemented Interfaces:
public class BiochemicalReactionBuilder<P extends Position<P>, Vector<P>>
This class implements a builder for chemical reactions.
-
-
Constructor Summary
Constructors Constructor Description BiochemicalReactionBuilder(BiochemistryIncarnation incarnation, Node<Double> currentNode, Environment<Double, P> environment)
Construct a builder for biochemical reactions.
-
Method Summary
Modifier and Type Method Description Reaction<Double>
build()
Builds the chemical reaction. BiochemicalReactionBuilder<P>
program(String program)
Set the reaction to the passed program string. BiochemicalReactionBuilder<P>
randomGenerator(RandomGenerator rg)
set the random generator to the passed object. BiochemicalReactionBuilder<P>
timeDistribution(TimeDistribution<Double> td)
Set the time distribution to the passed object. -
-
Constructor Detail
-
BiochemicalReactionBuilder
BiochemicalReactionBuilder(BiochemistryIncarnation incarnation, Node<Double> currentNode, Environment<Double, P> environment)
Construct a builder for biochemical reactions.- Parameters:
incarnation
- the current incarnationcurrentNode
- the node where the reaction is placed.environment
- the environment.
-
-
Method Detail
-
build
Reaction<Double> build()
Builds the chemical reaction.
- Returns:
a chemical reaction based on the given program
-
program
BiochemicalReactionBuilder<P> program(String program)
Set the reaction to the passed program string.
- Parameters:
program
- the string version of this reaction- Returns:
.
-
randomGenerator
BiochemicalReactionBuilder<P> randomGenerator(RandomGenerator rg)
set the random generator to the passed object.
- Parameters:
rg
- the random generator.- Returns:
.
-
timeDistribution
BiochemicalReactionBuilder<P> timeDistribution(TimeDistribution<Double> td)
Set the time distribution to the passed object.
- Parameters:
td
- the time distribution- Returns:
.
-
-
-
-