- if (bit == Bit.ONE)\r
- switchOn();\r
- else if (bit == Bit.ZERO)\r
- switchOff();\r
- else\r
- throw new IllegalArgumentException("Cannot set ManualSwitch to the value of Bit " + bit);\r
+ if (bits.length() != output.length())\r
+ throw new IllegalArgumentException("Incorrect bit vector length");\r
+ if (bits.equals(output.getInputValues()))\r
+ return;\r
+ output.feedSignals(bits);\r
+ notifyObservers();\r