involvesPort method
Checks if this connection involves the given port on a specific node.
Returns true if the specified node and port combination matches either the source or target of this connection.
Parameters:
nodeId: The ID of the node to checkportId: The ID of the port to check
Returns: true if the node/port pair matches either the source or target
Implementation
bool involvesPort(String nodeId, String portId) {
return (sourceNodeId == nodeId && sourcePortId == portId) ||
(targetNodeId == nodeId && targetPortId == portId);
}