T
- the value type held along with the interval lengthpublic class TimeInterval<T>
extends java.lang.Object
TimeInterval
represents an item emitted by an Observable
along with the amount of time that
elapsed either since the emission of the previous item or (if there was no previous item) since the
Observable
was first subscribed to.Constructor and Description |
---|
TimeInterval(long intervalInMilliseconds,
T value)
Creates a
TimeInterval object. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
long |
getIntervalInMilliseconds()
Returns the time interval, expressed in milliseconds.
|
T |
getValue()
Returns the item that was emitted by the Observable after this time interval.
|
int |
hashCode() |
java.lang.String |
toString() |
public TimeInterval(long intervalInMilliseconds, T value)
TimeInterval
object.intervalInMilliseconds
- the number of milliseconds between the time when value
was emitted and the item that
was emitted immediately prior to value
, or, if there was no such prior item, since the
initial subscription to the Observable
value
- the item emitted by the Observablepublic long getIntervalInMilliseconds()
public T getValue()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object