forked from openhab/openhab-addons
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor changes in code showing how code could be organized.
Signed-off-by: Łukasz Dywicki <luke@code-house.org>
- Loading branch information
Showing
9 changed files
with
89 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...irquality/src/main/java/org/openhab/binding/airquality/internal/json/AirQualityValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.openhab.binding.airquality.internal.json; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* Wrapper type around values reported by aqicn index values. | ||
*/ | ||
public class AirQualityValue<T extends Number> { | ||
|
||
@SerializedName("v") | ||
private T value; | ||
|
||
public void setValue(T value) { | ||
this.value = value; | ||
} | ||
|
||
public T getValue() { | ||
return value; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...ding.airquality/src/main/java/org/openhab/binding/airquality/internal/json/Attribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.openhab.binding.airquality.internal.json; | ||
|
||
/** | ||
* Attribute representation. | ||
*/ | ||
public class Attribute { | ||
|
||
private String name; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
} |