/** * Function for replacing a spesific given connected device with a given new connected devices. * * @param NewconnectedDevice The connected device to replace the previous one. * @param OldconnectedDevice The connected device to be replaced. */ @Override public void changeConnectedDevice(Object NewconnectedDevice, Object OldconnectedDevice) { components = ComponentsManagment.changeComponent( NewconnectedDevice, OldconnectedDevice, connectedDevices, connectedDevicesCounter); // Sets the new count for number of connected devices in the array connectedDevicesCounter = connectedDevices.length; }
/** * Function for replacing a spesific given component with a given new component. * * @param NewComponent The component to replace the previous one. * @param OldComponent The component to be replaced. */ @Override public void changeComponent(Object NewComponent, Object OldComponent) { components = ComponentsManagment.changeComponent( NewComponent, OldComponent, components, componentCounter); // Sets the new count for number of components in the array componentCounter = components.length; }