コード例 #1
0
 @Override
 public void turnOn(MotionSensor motionSensor) {
   motionSensor.setRunnable(true);
   System.out.println("The motionSensor has turned on.");
 }
コード例 #2
0
 @Override
 public void turnOff(MotionSensor motionSensor) {
   motionSensor.setRunnable(false);
   System.out.println("The motionSensor has turned off.");
 }