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(String ObjName, String obj) { super(ObjName); super.name = obj; isWorking = false; } public HolonSwitch(CpsObject obj) { super(obj); this.isWorking = ((HolonSwitch)obj).getStates(); } public void switchState() { this.isWorking = !isWorking; } public boolean getStates() { return this.isWorking; } }