File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2023. Smart Operating Block
3
+ *
4
+ * Use of this source code is governed by an MIT-style
5
+ * license that can be found in the LICENSE file or at
6
+ * https://opensource.org/licenses/MIT.
7
+ */
8
+
9
+ package entity .actuator ;
10
+
11
+ import entity .actuator .invoker .SwitchableInvoker ;
12
+
13
+ /**
14
+ * An {@link Actuator} that can be switched on and off.
15
+ */
16
+ public class SwitchableActuator extends Actuator {
17
+ /**
18
+ * Default constructor.
19
+ * @param actuatorID the actuator id.
20
+ */
21
+ public SwitchableActuator (final ActuatorID actuatorID ) {
22
+ super (actuatorID );
23
+ }
24
+
25
+ /**
26
+ * Turn on the actuator.
27
+ * @param invoker the invoker to call.
28
+ */
29
+ public void turnOn (final SwitchableInvoker invoker ) {
30
+ invoker .turnOn ();
31
+ }
32
+
33
+ /**
34
+ * Turn off the actuator.
35
+ * @param invoker the invoker to call.
36
+ */
37
+ public void turnOff (final SwitchableInvoker invoker ) {
38
+ invoker .turnOff ();
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments