public void switchReleased(ISwitch sw) { SwitchStatus status = new SwitchStatus(switches.length); for (int i = 0; i != switches.length; i++) { status.setStatus(i, switches[i].isOpen()); if (sw == switches[i]) { status.setChanged(i); } } notifyObservers(status); }