alchemist-interfaces / it.unibo.alchemist.model.interfaces / Node

Node

interface Node<T : Any!> : Serializable, MutableIterable<Reaction<T>!>, Comparable<Node<T>!>

Functions

addReaction

Adds a reaction to this node.

abstract fun addReaction(r: Reaction<T>!): Unit

cloneNode

Creates a new Node which is a clone of the current Node. The new Node will have all the current Node's properties, such as reactions and molecules, but it will also have a different ID.

abstract fun cloneNode(currentTime: Time!): Node<T>!

contains

Tests whether a node contains a Molecule.

abstract fun contains(mol: Molecule!): Boolean

getChemicalSpecies

This method is usefult to know how many different chemical species may be contained in this node.

abstract fun getChemicalSpecies(): Int

getConcentration

Calculates the concentration of a molecule.

abstract fun getConcentration(mol: Molecule!): T

getContents

abstract fun getContents(): MutableMap<Molecule!, T>!

getId

abstract fun getId(): Int

getReactions

This method allows to access all the reaction of the node.

abstract fun getReactions(): MutableList<Reaction<T>!>!

getShape

The shape of the node, used in environments supporting geometry and physics.

abstract fun getShape(): GeometricShape<*, *>!

removeConcentration

abstract fun removeConcentration(mol: Molecule!): Unit

removeReaction

Removes a reaction from this node.

abstract fun removeReaction(r: Reaction<T>!): Unit

setConcentration

Sets the concentration of mol to c.

abstract fun setConcentration(mol: Molecule!, c: T): Unit