Skip to content

Commit 6ca1f91

Browse files
chore: create dimmable actuator entity
1 parent 5aa476a commit 6ca1f91

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.DimmableInvoker;
12+
13+
/**
14+
* An {@link Actuator} that can be dimmed.
15+
*/
16+
public class DimmableActuator extends Actuator {
17+
/**
18+
* Default constructor.
19+
* @param actuatorID the actuator id.
20+
*/
21+
public DimmableActuator(final ActuatorID actuatorID) {
22+
super(actuatorID);
23+
}
24+
25+
/**
26+
* Set the intensity of the actuator.
27+
* @param intensity the intensity.
28+
* @param invoker the invoker to call
29+
*/
30+
public void setIntensity(final int intensity, final DimmableInvoker invoker) {
31+
invoker.setIntensity(intensity);
32+
}
33+
}

0 commit comments

Comments
 (0)