EnvironmentNodeImpl

A node with non-negative concentration.

Constructors

Link copied to clipboard
constructor(environment: Environment<Double, out Any>)
Create a new environment node.

Properties

Link copied to clipboard
Link copied to clipboard

The environment in which the node is places.

Link copied to clipboard
val id: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun addProperty(capability: Capability<T>)
fun addProperty(capability: Capability<T>)

Adds a capability to the node. Properties are part of the node setup: adding one fails once the node is in an environment, so properties can be read without being observed.

Link copied to clipboard
abstract fun addReaction(reaction: Reaction<T>)
fun addReaction(reaction: Reaction<T>)

Registers reaction and notifies the running simulation when it was not already present. Fails if this is not the Reaction.host of reaction.

Link copied to clipboard
open fun <C : Capability<T>?> asProperty(superType: KClass<C>): C

returns a Capability of the provided superType.

Link copied to clipboard
inline fun <T, C : Capability<T>> Node<T>.asProperty(): C

Returns the node property of the reified type C.

Link copied to clipboard
open fun <C : Capability<T>?> asPropertyOrNull(superType: Class<in C>): C

returns a Capability of the provided superType.

Link copied to clipboard
inline fun <T, C : Capability<T>> Node<T>.asPropertyOrNull(): C?

Returns the node property of the reified type C, or null if the node does not have a compatible property.

Link copied to clipboard
abstract fun cloneNode(): Node<T>
open fun cloneNode(): Node<T>

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. Its reactions are cloned through NodeReaction.cloneOnNewNode.

Link copied to clipboard
fun compareTo(other: Node<T>): Int
abstract fun compareTo(p: T): Int
Link copied to clipboard
abstract fun concentrationOf(molecule: Molecule): Observable<Option<T>>
open fun concentrationOf(molecule: Molecule): Observable<Option<T>>

Observe the concentration calculated with the given molecule. The result of this computation is wrapped into an Option and some if the value is present, otherwise none.

Link copied to clipboard
abstract fun contains(molecule: Molecule): Boolean
open fun contains(molecule: Molecule): Boolean

Tests whether a node contains a Molecule.

Link copied to clipboard
abstract fun containsMolecule(molecule: Molecule): Observable<Boolean>

Observes whether a node contains a Molecule.

Link copied to clipboard
open fun dispose()
abstract fun dispose()

Disposes and releases the resources held by this object.

Link copied to clipboard
abstract fun equals(other: Any): Boolean
fun equals(other: Any): Boolean
Link copied to clipboard
abstract fun get(molecule: Molecule): Option<T>
open fun get(molecule: Molecule): Option<T>

The concentration of a molecule, some if the molecule is present in this node, none otherwise.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getProperties(): List<Capability<T>>
Link copied to clipboard

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

Link copied to clipboard
abstract fun hashCode(): Int
fun hashCode(): Int
Link copied to clipboard
open fun remove($this$remove: Reaction<T>)

Unregisters this reaction from its host, see removeReaction.

Link copied to clipboard
abstract fun removeAllConcentrationOf(moleculeToRemove: Molecule)
open fun removeAllConcentrationOf(moleculeToRemove: Molecule)
Link copied to clipboard
abstract fun removeReaction(reaction: Reaction<T>)
fun removeReaction(reaction: Reaction<T>)

Unregisters reaction and notifies the running simulation when it was actually present.

Link copied to clipboard
open fun set(@Nonnull molecule: Molecule, @Nonnull concentration: Double)
Sets the concentration of mol to c.
Link copied to clipboard
infix fun Node<*>.shouldEqual(other: Node<*>)
Link copied to clipboard
Link copied to clipboard
fun <T, P : Position<out P>, TS : Any, PS : PositionSurrogate> Node<T>.toNodeSurrogate(environment: Environment<T, P>, toConcentrationSurrogate: (T) -> TS, toPositionSurrogate: (P) -> PS): NodeSurrogate<TS, PS>
Link copied to clipboard
open fun toString(): String