Package rx.schedulers
Class TimeInterval<T>
java.lang.Object
rx.schedulers.TimeInterval<T>
- Type Parameters:
T
- the value type held along with the interval length
A
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.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTimeInterval
(long intervalInMilliseconds, T value) Creates aTimeInterval
object. -
Method Summary
-
Field Details
-
intervalInMilliseconds
private final long intervalInMilliseconds -
value
-
-
Constructor Details
-
TimeInterval
Creates aTimeInterval
object.- Parameters:
intervalInMilliseconds
- the number of milliseconds between the time whenvalue
was emitted and the item that was emitted immediately prior tovalue
, or, if there was no such prior item, since the initial subscription to theObservable
value
- the item emitted by the Observable
-
-
Method Details
-
getIntervalInMilliseconds
public long getIntervalInMilliseconds()Returns the time interval, expressed in milliseconds.- Returns:
- the time interval in milliseconds
-
getValue
Returns the item that was emitted by the Observable after this time interval.- Returns:
- the item that was emitted by the Observable
-
hashCode
public int hashCode() -
equals
-
toString
-