Package org.openmuc.framework.data
Class Record
- java.lang.Object
-
- org.openmuc.framework.data.Record
-
public class Record extends java.lang.ObjectA Record may represent a reading or a database entry. Record is immutable. It contains a value, a timestamp, and a flag.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)FlaggetFlag()java.lang.LonggetTimestamp()ValuegetValue()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Record
public Record(Value value, java.lang.Long timestamp)
Creates a valid record.- Parameters:
value- the value of the recordtimestamp- the timestamp of the record
-
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.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getValue
public Value getValue()
-
getTimestamp
public java.lang.Long getTimestamp()
-
getFlag
public Flag getFlag()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-