Skip to content

Commit 1991feb

Browse files
chore: create room event temperature payload
1 parent 1536e1f commit 1991feb

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 application.presenter.event.model.roomevent.payload;
10+
11+
/**
12+
* Temperature payload for {@link application.presenter.event.model.roomevent.RoomEvent}.
13+
*/
14+
public class TemperaturePayload implements RoomEventPayload {
15+
private final double temperatureValue;
16+
private final String temperatureUnit;
17+
18+
/**
19+
* Default constructor.
20+
* @param temperatureValue the temperature value.
21+
* @param temperatureUnit the temperature unit.
22+
*/
23+
public TemperaturePayload(final double temperatureValue, final String temperatureUnit) {
24+
this.temperatureValue = temperatureValue;
25+
this.temperatureUnit = temperatureUnit;
26+
}
27+
28+
/**
29+
* Get the temperature value.
30+
* @return the temperature value.
31+
*/
32+
public double getTemperatureValue() {
33+
return this.temperatureValue;
34+
}
35+
36+
/**
37+
* Get the temperature unit.
38+
* @return the temperature unit.
39+
*/
40+
public String getTemperatureUnit() {
41+
return this.temperatureUnit;
42+
}
43+
}

0 commit comments

Comments
 (0)