Package io.reactivex.rxjava3.schedulers
Class Timed<T>
- java.lang.Object
-
- io.reactivex.rxjava3.schedulers.Timed<T>
-
- Type Parameters:
T- the value type
public final class Timed<T> extends java.lang.ObjectHolds onto a value along with time information.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)inthashCode()longtime()Returns the time value.longtime(@NonNull java.util.concurrent.TimeUnit unit)Returns the contained time value in the time unit specified.java.lang.StringtoString()@NonNull java.util.concurrent.TimeUnitunit()Returns the time unit of the contained time.Tvalue()Returns the contained value.
-
-
-
Field Detail
-
value
final T value
-
time
final long time
-
unit
final java.util.concurrent.TimeUnit unit
-
-
Constructor Detail
-
Timed
public Timed(@NonNull T value, long time, @NonNull @NonNull java.util.concurrent.TimeUnit unit)
Constructs aTimedinstance with the given value and time information.- Parameters:
value- the value to holdtime- the time to holdunit- the time unit, not null- Throws:
java.lang.NullPointerException- ifvalueorunitisnull
-
-
Method Detail
-
unit
@NonNull public @NonNull java.util.concurrent.TimeUnit unit()
Returns the time unit of the contained time.- Returns:
- the time unit of the contained time
-
time
public long time()
Returns the time value.- Returns:
- the time value
-
time
public long time(@NonNull @NonNull java.util.concurrent.TimeUnit unit)
Returns the contained time value in the time unit specified.- Parameters:
unit- the time unit- Returns:
- the converted time
-
equals
public boolean equals(java.lang.Object other)
- 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
-
-