Fixed compilation issues
This commit is contained in:
parent
7d64788154
commit
98c48e595f
5 changed files with 76 additions and 5 deletions
36
hal-core/src/se/hal/struct/devicedata/CostSensorData.java
Normal file
36
hal-core/src/se/hal/struct/devicedata/CostSensorData.java
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
package se.hal.struct.devicedata;
|
||||
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
||||
|
||||
public class CostSensorData extends HalSensorData {
|
||||
|
||||
private double cost;
|
||||
|
||||
|
||||
public CostSensorData(){}
|
||||
public CostSensorData(double cost, long timestamp){
|
||||
this.cost = cost;
|
||||
super.setTimestamp(timestamp);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return cost + "";
|
||||
}
|
||||
|
||||
// ----------------------------------------
|
||||
// Storage methods
|
||||
// ----------------------------------------
|
||||
|
||||
@Override
|
||||
public double getData() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(double cost) {
|
||||
this.cost = cost;
|
||||
}
|
||||
}
|
||||
36
hal-core/src/se/hal/struct/devicedata/PriceSensorData.java
Normal file
36
hal-core/src/se/hal/struct/devicedata/PriceSensorData.java
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
package se.hal.struct.devicedata;
|
||||
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
||||
|
||||
public class PriceSensorData extends HalSensorData {
|
||||
|
||||
private double price;
|
||||
|
||||
|
||||
public PriceSensorData(){}
|
||||
public PriceSensorData(double price, long timestamp){
|
||||
this.price = price;
|
||||
super.setTimestamp(timestamp);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return price + "";
|
||||
}
|
||||
|
||||
// ----------------------------------------
|
||||
// Storage methods
|
||||
// ----------------------------------------
|
||||
|
||||
@Override
|
||||
public double getData() {
|
||||
return price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue