The edges that are adjacent to this node.
The nodes that are adjacent to this node.
The ancestors (parents, parents' parents, etc.) of this node.
The children of this node.
Use the data object for JSON serializable data. For temporary or non-serializable data, use BaseNode.Class.scratchData.
the data object associated with this node.
Returns the number of edges connected to this node. Loop edges are counted twice.
the degree of this node.
Returns the number of edges connected to this node. Loop edges are not counted.
the degree of this node, excluding loop edges.
The descendants (children, children's children, etc.) of this node.
the unique identifier of this node.
The edges that connect to this node.
Returns the number of edges that are directed towards this node.
the indegree of this node.
Returns the number of edges that are directed towards this node. Loop edges are not counted.
the indegree of this node, excluding loop edges.
whether this node is a child node.
whether this node is a parent node.
whether this node has been removed from the graph.
Returns the number of edges that are directed away from this node.
the outdegree of this node.
Returns the number of edges that are directed away from this node. Loop edges are not counted.
the outdegree of this node, excluding loop edges.
The edges that connect from this node.
The predecessors of this node. This repeatedly follows the sources of incoming edges.
Use the scratch data object for temporary or non-serializable data. For JSON serializable data, use BaseEdge.Class.data.
The scratch data is stored under the @specs-feup/flow namespace.
the scratch data object associated with this node.
The successors of this node. This repeatedly follows the targets of outgoing edges.
Changes the functionality class of the current node. This is only possible if the data and scratch data are compatible with the new class. To assert that, use BaseNode.Class.is.
The same node, wrapped in the new functionality class.
Retrieves the edges from the given nodes to this node.
The node or collection of nodes to check for edges connected with this node.
The edges from the given nodes to this node.
Retrieves the edges from this node to the given nodes.
The node or collection of nodes to check for edges connected with this node.
The edges from this node to the given nodes.
Retrieves the edges that connect this node with the given nodes. Direction is not considered.
The node or collection of nodes to check for edges connected with this node.
The edges that connect this node with the given nodes.
Changes the functionality class of the current node. Should only be used when it is known (but not statically provable) that the node is compatible with the new class. If not, an error will be thrown.
It is bad practice to try and catch the error thrown by this function. For such cases, combine BaseNode.Class.is with BaseNode.Class.as, or use BaseNode.Class.switch instead.
The node, wrapped in the new functionality class.
LaraFlowError if the node is not compatible with the type. This error should be seen as a logic error and not catched.
Initializes the node with the information of a builder. This is effectively extends the type of the node to include the data and scratch data of the builder.
The same node may simultaneously be of multiple types, as long as the data and scratch data are compatible with the types. The builder methods may overwrite data and scratch data fields with names that collide with its type's fields.
The same node, with the data and scratch data of the builder. The node is downcasted to BaseNode.Class because the builder may overwrite the data and scratch data fields, invalidating the current type.
Restores this node if it has been removed. See BaseNode.Class.remove.
Checks if the type of the node is compatible with several types, calling a callback for the first match. See Node.Case for the syntax of each case.
For a default case, match with BaseNode, which will always be compatible with any node type.
Rest
...cases: _Case<BaseNode.Data, BaseNode.ScratchData, BaseNode.Class<BaseNode.Data, BaseNode.ScratchData>>[]The cases to match against.
Tries to change the functionality class of the current node. If the node is not compatible with the new class, undefined is returned.
The node, wrapped in the new functionality class, or undefined if the node is not compatible with the type.
The class with functionality for the base node type.