예제 #1
0
 public String setStatus(boolean turnOn) throws ComplianceException {
   boolean currentStatus = getStatus();
   if (currentStatus == true && turnOn == false) {
     ComplianceSwitchController.complianceOff();
     return null;
   }
   if (currentStatus == false && turnOn == true) {
     String complianceOn = ComplianceSwitchController.complianceOn();
     return complianceOn;
   }
   return null;
 }
예제 #2
0
 private boolean getStatus() {
   return ComplianceSwitchController.isOn();
 }