public final class

Timed

extends Object
java.lang.Object
   ↳ io.reactivex.schedulers.Timed<T>

Class Overview

Holds onto a value along with time information.

Summary

Public Constructors
Timed(T value, long time, TimeUnit unit)
Constructs a Timed instance with the given value and time information.
Public Methods
boolean equals(Object other)
int hashCode()
long time()
Returns the time value.
long time(TimeUnit unit)
Returns the contained time value in the time unit specified.
String toString()
TimeUnit unit()
Returns the time unit of the contained time.
T value()
Returns the contained value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Timed (T value, long time, TimeUnit unit)

Constructs a Timed instance with the given value and time information.

Parameters
value the value to hold
time the time to hold
unit the time unit, not null
Throws
NullPointerException if unit is null

Public Methods

public boolean equals (Object other)

public int hashCode ()

public long time ()

Returns the time value.

Returns
  • the time value

public long time (TimeUnit unit)

Returns the contained time value in the time unit specified.

Parameters
unit the time unt
Returns
  • the converted time

public String toString ()

public TimeUnit unit ()

Returns the time unit of the contained time.

Returns
  • the time unit of the contained time

public T value ()

Returns the contained value.

Returns
  • the contained value