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

Dependency

interface Dependency : Serializable

This interface represents a token that may generate a dependency between two reactions. Some special built-in tokens are EVERYTHING, EVERY_MOLECULE, MOVEMENT, and NEIGHBORHOOD_CHANGE. Molecules are dependencies as well.

Properties

EVERY_MOLECULE

Declares a dependency towards any modified molecule in the reachable scope.

static val EVERY_MOLECULE: Dependency!

EVERYTHING

Declares a dependency towards any other reaction in the reachable scope.

static val EVERYTHING: Dependency!

MOVEMENT

Declares a dependency on movement of nodes in the reachable scope.

static val MOVEMENT: Dependency!

Functions

dependsOn

Determines whether this dependency depends on the provided dependency. The default behavior requires equality.

open fun dependsOn(dependency: Dependency!): Boolean

makesDependent

Determines whether the provided dependency depends on this dependency. The default behavior calls #dependsOn(Dependency), and provides a bidirectional dependency.

open fun makesDependent(dependency: Dependency!): Boolean

Inheritors

Molecule

Interface for a molecule.

interface Molecule : Dependency