public final class TimestampedData extends java.lang.Object implements java.lang.Comparable<TimestampedData>
Constructor and Description |
---|
TimestampedData(java.lang.String sourceId,
DataType dataType,
java.lang.Object data,
long timestamp)
Creates a new time stamped data object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TimestampedData other) |
boolean |
equals(java.lang.Object other) |
java.lang.Object |
getData() |
DataType |
getDataType() |
java.lang.String |
getSourceId() |
long |
getTimestamp() |
int |
hashCode() |
java.lang.String |
toString() |
public TimestampedData(java.lang.String sourceId, DataType dataType, java.lang.Object data, long timestamp)
sourceId
- the ID of the source corresponding to this datadataType
- the type of this datadata
- the actual datatimestamp
- the timestamp for when the data was recordedpublic java.lang.String getSourceId()
public DataType getDataType()
public java.lang.Object getData()
public long getTimestamp()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(TimestampedData other)
compareTo
in interface java.lang.Comparable<TimestampedData>