File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ public DimmableActuator(final ActuatorID actuatorID) {
28
28
* @param invoker the invoker to call
29
29
*/
30
30
public void setIntensity (final int intensity , final DimmableInvoker invoker ) {
31
- invoker .setIntensity (intensity );
31
+ invoker .setIntensity (this . getId (), intensity );
32
32
}
33
33
}
Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ public SwitchableActuator(final ActuatorID actuatorID) {
27
27
* @param invoker the invoker to call.
28
28
*/
29
29
public void turnOn (final SwitchableInvoker invoker ) {
30
- invoker .turnOn ();
30
+ invoker .turnOn (this . getId () );
31
31
}
32
32
33
33
/**
34
34
* Turn off the actuator.
35
35
* @param invoker the invoker to call.
36
36
*/
37
37
public void turnOff (final SwitchableInvoker invoker ) {
38
- invoker .turnOff ();
38
+ invoker .turnOff (this . getId () );
39
39
}
40
40
}
Original file line number Diff line number Diff line change 8
8
9
9
package entity .actuator .invoker ;
10
10
11
+ import entity .actuator .ActuatorID ;
12
+
11
13
/**
12
14
* Interface that models an actuator invoker that ca be turned on with an intensity.
13
15
*/
14
16
public interface DimmableInvoker {
15
17
/**
16
18
* Set the intensity of the actuator.
19
+ * @param actuatorID the id of the actuator.
17
20
* @param intensity the intensity to set in the actuator.
18
21
*/
19
- void setIntensity (int intensity );
22
+ void setIntensity (ActuatorID actuatorID , int intensity );
20
23
}
Original file line number Diff line number Diff line change 8
8
9
9
package entity .actuator .invoker ;
10
10
11
+ import entity .actuator .ActuatorID ;
12
+
11
13
/**
12
14
* Interface that models an actuator invoker that can be turned on and off.
13
15
*/
14
16
public interface SwitchableInvoker {
15
17
/**
16
18
* Turn the actuator on.
19
+ * @param actuatorID the id of the actuator.
17
20
*/
18
- void turnOn ();
21
+ void turnOn (ActuatorID actuatorID );
19
22
20
23
/**
21
24
* Turn the actuator off.
25
+ * @param actuatorID the id of the actuator.
22
26
*/
23
- void turnOff ();
27
+ void turnOff (ActuatorID actuatorID );
24
28
}
You can’t perform that action at this time.
0 commit comments