updatePort method
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 updateupdatedPort- 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);
}