involvesPort method

bool involvesPort(
  1. String nodeId,
  2. String portId
)

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 check
  • portId: 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);
}