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.ObjectComposite class that takes a value and a timestamp and wraps them.
-
-
Field Summary
Fields Modifier and Type Field Description private longtimestampMillisprivate Tvalue
-
Constructor Summary
Constructors Constructor Description Timestamped(long timestampMillis, T value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)longgetTimestampMillis()Returns the timestamp, expressed in milliseconds.TgetValue()Returns the value embedded in theTimestampedobject.inthashCode()java.lang.StringtoString()
-
-
-
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 theTimestampedobject.- Returns:
- the value
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-