Package it.unibo.alchemist.model.nodes
Class GenericNode
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Node
,java.io.Serializable
,kotlin.Comparable
,kotlin.collections.Iterable
public class GenericNode<T extends Object> implements Node<T>
This class realizes an abstract node. You may extend it to realize your own nodes.
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<Molecule, T>
contents
private final Integer
moleculeCount
private final Incarnation<T, ?>
incarnation
private final Environment<T, ?>
environment
private final Integer
id
private final List<Reaction<T>>
reactions
private final Map<Molecule, T>
molecules
private final List<NodeProperty<T>>
properties
-
Constructor Summary
Constructors Constructor Description GenericNode(Environment<T, ?> environment)
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id, List<Reaction<T>> reactions, Map<Molecule, T> molecules, List<NodeProperty<T>> properties)
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id, List<Reaction<T>> reactions, Map<Molecule, T> molecules)
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id, List<Reaction<T>> reactions)
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id)
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment)
-
Method Summary
-
-
Constructor Detail
-
GenericNode
GenericNode(Environment<T, ?> environment)
-
GenericNode
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id, List<Reaction<T>> reactions, Map<Molecule, T> molecules, List<NodeProperty<T>> properties)
-
GenericNode
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id, List<Reaction<T>> reactions, Map<Molecule, T> molecules)
-
GenericNode
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id, List<Reaction<T>> reactions)
-
GenericNode
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment, Integer id)
-
GenericNode
GenericNode(Incarnation<T, ?> incarnation, Environment<T, ?> environment)
-
-
Method Detail
-
getContents
Map<Molecule, T> getContents()
-
getMoleculeCount
Integer getMoleculeCount()
-
getIncarnation
final Incarnation<T, ?> getIncarnation()
simulation incarnation.
-
getEnvironment
final Environment<T, ?> getEnvironment()
The environment in which the node is places.
-
getReactions
final List<Reaction<T>> getReactions()
-
getMolecules
final Map<Molecule, T> getMolecules()
The node's molecules.
-
getProperties
final List<NodeProperty<T>> getProperties()
-
addReaction
final Unit addReaction(Reaction<T> reactionToAdd)
-
getConcentration
T getConcentration(Molecule molecule)
-
removeConcentration
final Unit removeConcentration(Molecule moleculeToRemove)
-
removeReaction
final Unit removeReaction(Reaction<T> reactionToRemove)
-
setConcentration
Unit setConcentration(Molecule molecule, T concentration)
-
addProperty
final Unit addProperty(NodeProperty<T> nodeProperty)
-
spliterator
final Spliterator<Reaction<T>> spliterator()
Returns the reactions.
-
-
-
-