parent
80bcceb957
commit
458907da11
@ -1,7 +1,41 @@
|
||||
package model;
|
||||
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
|
||||
public abstract class CapteurAbstrait {
|
||||
private int id;
|
||||
private String nom;
|
||||
private ObjectProperty<Double> temp = new SimpleObjectProperty<>();
|
||||
|
||||
CapteurAbstrait(int id, String nom, Double temp){
|
||||
this.id = id;
|
||||
this.nom = nom;
|
||||
this.temp.setValue(temp);
|
||||
}
|
||||
public abstract ObjectProperty<Double> genTemp();
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public ObjectProperty<Double> getTemp() {
|
||||
return temp;
|
||||
}
|
||||
|
||||
public void setTemp(int pTemp) {
|
||||
this.temp.set((double)pTemp);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue