Package it.unibo.alchemist.model
Interface Incarnation
-
- All Implemented Interfaces:
public interface Incarnation<T, P extends Position<out P>>
-
-
Method Summary
Modifier and Type Method Description abstract double
getProperty(Node<T> node, Molecule molecule, String property)
Given a Node, a Molecule and a property expressed as a String, returns a numeric value. abstract Molecule
createMolecule(String s)
Parses a String, and provides a Molecule. abstract T
createConcentration(@Nullable() Object descriptor)
Creates a new concentration object of a specific concrete type. abstract T
createConcentration()
Creates a new concentration object of a specific concrete type. abstract Node<T>
createNode(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Object parameter)
abstract TimeDistribution<T>
createTimeDistribution(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Node<T> node, @Nullable() Object parameter)
abstract Reaction<T>
createReaction(RandomGenerator randomGenerator, Environment<T, P> environment, Node<T> node, TimeDistribution<T> timeDistribution, @Nullable() Object parameter)
abstract Condition<T>
createCondition(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Node<T> node, TimeDistribution<T> time, Actionable<T> actionable, @Nullable() Object additionalParameters)
abstract Action<T>
createAction(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Node<T> node, TimeDistribution<T> time, Actionable<T> actionable, @Nullable() Object additionalParameters)
-
-
Method Detail
-
getProperty
abstract double getProperty(Node<T> node, Molecule molecule, String property)
Given a Node, a Molecule and a property expressed as a String, returns a numeric value. If a numeric value is not deducible, Double.NaN is returned.
- Parameters:
node
- the nodemolecule
- the molecule to analyzeproperty
- the property to extract- Returns:
a numeric value representing the property
-
createMolecule
abstract Molecule createMolecule(String s)
-
createConcentration
abstract T createConcentration(@Nullable() Object descriptor)
Creates a new concentration object of a specific concrete type.
- Parameters:
descriptor
- the String to parse- Returns:
a concentration of a certain concrete type
-
createConcentration
abstract T createConcentration()
Creates a new concentration object of a specific concrete type.
- Returns:
a concentration of a certain concrete type
-
createNode
abstract Node<T> createNode(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Object parameter)
-
createTimeDistribution
abstract TimeDistribution<T> createTimeDistribution(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Node<T> node, @Nullable() Object parameter)
- Parameters:
randomGenerator
- the random engineenvironment
- the environment that will host this objectnode
- the node that will host this object.parameter
- a String describing the object- Returns:
a new TimeDistribution
-
createReaction
abstract Reaction<T> createReaction(RandomGenerator randomGenerator, Environment<T, P> environment, Node<T> node, TimeDistribution<T> timeDistribution, @Nullable() Object parameter)
-
createCondition
abstract Condition<T> createCondition(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Node<T> node, TimeDistribution<T> time, Actionable<T> actionable, @Nullable() Object additionalParameters)
- Parameters:
randomGenerator
- the random engineenvironment
- the environment that will host this objectnode
- the node that will host this object.time
- the time distribution of the reactionactionable
- the actionable hosting this objectadditionalParameters
- a String describing the object- Returns:
a new Condition
-
createAction
abstract Action<T> createAction(RandomGenerator randomGenerator, Environment<T, P> environment, @Nullable() Node<T> node, TimeDistribution<T> time, Actionable<T> actionable, @Nullable() Object additionalParameters)
- Parameters:
randomGenerator
- the random engineenvironment
- the environment that will host this objectnode
- the node that will host this object.time
- the time distribution of the reactionactionable
- the actionable hosting this objectadditionalParameters
- a String describing the object- Returns:
a new Action
-
-
-
-