|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uwcse.location.core.Measurement
The Measurement class is a generic class from which the fundamental location measurements types inherit. It provides a timestamp and sensor and object names.
| Nested Class Summary | |
static class |
Measurement.TimestampComparator
This class provides a comparator ordered by the timestamps of measurements, for example, in order to sort a list of Measurment objects by their timestamps. |
| Field Summary | |
protected String |
m_objectName
|
protected String |
m_sensorName
|
protected long |
m_timestamp
|
| Constructor Summary | |
Measurement()
Construct a Measurement with an empty string for the object and sensor names and a timestamp assigned by reading the system clock. |
|
Measurement(String objectName,
String sensorName)
Construct a Measurement with the given object and sensor names with the timestamp assigned by reading the system clock. |
|
Measurement(Measurement meas)
Construct a Measurement as a copy of the given Measurement object. |
|
| Method Summary | |
Object |
clone()
Perform a deep copy of this measurement. |
boolean |
equals(Object o)
Test for semantic equality with another measurement. |
String |
getObjectName()
Get the name of the physical object that this measurment was made of. |
String |
getSensorName()
Get the name of the sensor that took this Measurement. |
long |
getTimestamp()
Get the timestamp in milliseconds since epoch associated with this Measurement. |
int |
hashCode()
Overridden to maintain hash contract that equal objects return the same hash code. |
void |
setObjectName(String objectName)
Set the name of the physical object that this measurment was made of. |
void |
setSensorName(String sensorName)
Set the name of the sensor taking this Measurement. |
void |
setTimestamp(long timestamp)
Set the timestamp in milliseconds since epoch associated with this Measurement. |
String |
toString()
Return a string representation of this Measurement. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected long m_timestamp
protected String m_objectName
protected String m_sensorName
| Constructor Detail |
public Measurement()
public Measurement(String objectName,
String sensorName)
public Measurement(Measurement meas)
| Method Detail |
public Object clone()
clone in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic long getTimestamp()
public void setTimestamp(long timestamp)
public String getObjectName()
public void setObjectName(String objectName)
public String getSensorName()
public void setSensorName(String sensorName)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||