diff --git a/src/main/java/ch/hevs/isi/core/BooleanDataPoint.java b/src/main/java/ch/hevs/isi/core/BooleanDataPoint.java new file mode 100644 index 0000000..bd4a9d8 --- /dev/null +++ b/src/main/java/ch/hevs/isi/core/BooleanDataPoint.java @@ -0,0 +1,23 @@ +package ch.hevs.isi.core; + +public class BooleanDataPoint extends DataPoint{ + private boolean value; + + public BooleanDataPoint(String label, boolean isOutput) { + super(label, isOutput); + } + public void setValue(boolean value){ + this.value = value; + } + public boolean getValue(){ + return this.value; + } + + public String toString(){ + String s = null; + s += this.getLabel(); + s += ": "; + s += this.getValue(); + return s; + } +} diff --git a/src/main/java/ch/hevs/isi/core/DataPoint.java b/src/main/java/ch/hevs/isi/core/DataPoint.java new file mode 100644 index 0000000..5101614 --- /dev/null +++ b/src/main/java/ch/hevs/isi/core/DataPoint.java @@ -0,0 +1,34 @@ +package ch.hevs.isi.core; + +import java.util.Map; + +public class DataPoint { + private Map dataPointMap; + private String label; + private boolean isOutput; + protected DataPoint(String label, boolean isOutput){ + this.label = label; + this.isOutput = isOutput; + } + protected void update(boolean isNewValue){ + + } + public DataPoint getDataPointFromLabel(String label){ + return null; + } + + + + /** + * Just get the label of this DataPoint + * @return the label in a string + */ + public String getLabel(){ + return this.label; + } + public boolean isOutput(){ + return this.isOutput; + } + +} + diff --git a/src/main/java/ch/hevs/isi/core/FloatDataPoint.java b/src/main/java/ch/hevs/isi/core/FloatDataPoint.java new file mode 100644 index 0000000..5955a15 --- /dev/null +++ b/src/main/java/ch/hevs/isi/core/FloatDataPoint.java @@ -0,0 +1,24 @@ +package ch.hevs.isi.core; + +public class FloatDataPoint extends DataPoint{ + private float value; + public FloatDataPoint(String label, boolean isOutput) { + super(label, isOutput); + } + public void setValue(float value){ + this.value = value; + } + + public float getValue(){ + return this.value; + } + + public String toString(){ + String s = null; + s += this.getLabel(); + s += ": "; + s += this.getValue(); + return s; + } + +}