1234567891011121314151617181920212223242526 |
- package classes;
- public class HolonSwitch extends CpsObject {
- /*True, if this wire is working (capable of carrying electricity), else false*/
- boolean isWorking;
- public HolonSwitch(String ObjName) {
- super(ObjName);
- isWorking = false;
- }
-
- public HolonSwitch(HolonObject obj) {
- super(obj.objName);
- isWorking = false;
- }
-
-
- public void switchState() {
- this.isWorking = !isWorking;
- }
-
-
- public boolean getStates() {
- return this.isWorking;
- }
- }
|