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 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

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • 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