Class Record


  • public 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.
    • Constructor Summary

      Constructors 
      Constructor Description
      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)  
    • Constructor Detail

      • 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 - the value of the record
        timestamp - 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

      • 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