Package rx.schedulers

Class Timestamped<T>

  • Type Parameters:
    T - the value type held along with the timestamp

    public final class Timestamped<T>
    extends java.lang.Object
    Composite class that takes a value and a timestamp and wraps them.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long timestampMillis  
      private T value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Timestamped​(long timestampMillis, T value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      long getTimestampMillis()
      Returns the timestamp, expressed in milliseconds.
      T getValue()
      Returns the value embedded in the Timestamped object.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • timestampMillis

        private final long timestampMillis
      • value

        private final T value
    • Constructor Detail

      • Timestamped

        public Timestamped​(long timestampMillis,
                           T value)
    • Method Detail

      • getTimestampMillis

        public long getTimestampMillis()
        Returns the timestamp, expressed in milliseconds.
        Returns:
        timestamp in milliseconds
      • getValue

        public T getValue()
        Returns the value embedded in the Timestamped object.
        Returns:
        the value
      • equals

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object