updatePort method

bool updatePort(
  1. String portId,
  2. Port updatedPort
)

Updates a port by ID in either input or output ports.

This is a convenience method that searches both input and output ports.

Parameters:

  • portId - The unique identifier of the port to update
  • updatedPort - The new port object to replace the existing one

Returns true if the port was found and updated, false otherwise.

Implementation

bool updatePort(String portId, Port updatedPort) {
  return updateInputPort(portId, updatedPort) ||
      updateOutputPort(portId, updatedPort);
}