public class Measurement extends Object
Constructor and Description |
---|
Measurement()
Hide the default constructor.
|
Measurement(String sensorId,
Date timestamp,
Double value,
javax.measure.unit.Unit<?> units) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
equivalent(InterpolatedValue value) |
Date |
getDate() |
String |
getId() |
String |
getMeasurementType() |
String |
getSensorId() |
Double |
getValue() |
int |
hashCode() |
void |
setDate(Date timestamp) |
void |
setId(String id) |
void |
setMeasurementType(String measurementType)
The String measurementType must be a javax.measure.unit.Unit toString()
value.
|
void |
setSensorId(String sensorId) |
void |
setValue(Double value) |
String |
toString() |
javax.measure.unit.Unit<?> |
units() |
public boolean equivalent(InterpolatedValue value)
value
- a MeasuredValuepublic Date getDate()
public String getMeasurementType()
public String getSensorId()
public String getId()
public Double getValue()
public void setDate(Date timestamp)
timestamp
- the timestamp to setpublic void setMeasurementType(String measurementType)
measurementType
- the measurementType to setpublic void setSensorId(String sensorId)
sensorId
- the id of the sensor to setpublic void setId(String id) throws BadSlugException
id
- the id to setBadSlugException
- if the slug is not valid.public void setValue(Double value)
value
- the value to setpublic javax.measure.unit.Unit<?> units()
Copyright © 2015 Collaborative Software Development Laboratory. All rights reserved.