org.openmuc.framework.data
Class Record
java.lang.Object
org.openmuc.framework.data.Record
public final class Record
- extends java.lang.Object
A Record may represent a reading or a database entry. Record is immutable. It contains a value, a timestamp, and a
flag. If a record represents a measurement reading then the timestamp is supplied by the communication driver that
retrieved the data. If the data record is a processed value (e.g. a mean value that was stored in the database) then
the timestamp is supplied by the OpenMUC core.
Constructor Summary |
Record(Flag flag)
Creates an invalid record with the given flag. |
Record(Value value,
java.lang.Long timestamp)
Creates a valid record. |
Record(Value value,
java.lang.Long timestamp,
Flag flag)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NULL_RECORD
public static final Record NULL_RECORD
Record
public Record(Value value,
java.lang.Long timestamp,
Flag flag)
Record
public Record(Value value,
java.lang.Long timestamp)
- Creates a valid record.
- Parameters:
value
- timestamp
-
Record
public Record(Flag flag)
- Creates an invalid record with the given flag. The flag may not indicate valid.
- Parameters:
flag
- the flag of the invalid record.
getValue
public Value getValue()
getTimestamp
public java.lang.Long getTimestamp()
getFlag
public Flag getFlag()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object