Package rx.schedulers
Class Timestamped<T>
- java.lang.Object
-
- rx.schedulers.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 theTimestamped
object.int
hashCode()
java.lang.String
toString()
-
-
-
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 theTimestamped
object.- Returns:
- the value
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-