alchemist-interfaces / it.unibo.alchemist.model.interfaces / Environment / getNodeByID

getNodeByID

abstract fun getNodeByID(id: Int): Node<T>!

Allows to access a node known its id. Depending on the implementation, this method may or not be optimized (namely, id could run in constant or linear time with the number of nodes).

Parameters

id - Int: the node's ID

Return
Node<T>!: the node with that id, or null if it does not exist in this environment