T
- the value typepublic final class Timed<T> extends Object
Constructor and Description |
---|
Timed (T value,
long time,
@NonNull TimeUnit unit)
Constructs a
Timed instance with the given value and time information. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals (Object other) |
int |
hashCode () |
long |
time ()
Returns the time value.
|
long |
time (@NonNull TimeUnit unit)
Returns the contained time value in the time unit specified.
|
String |
toString () |
@NonNull TimeUnit |
unit ()
Returns the time unit of the contained time.
|
T |
value ()
Returns the contained value.
|
public Timed(@NonNull T value, long time, @NonNull @NonNull TimeUnit unit)
Timed
instance with the given value and time information.value
- the value to holdtime
- the time to holdunit
- the time unit, not nullNullPointerException
- if value
or unit
is null
@NonNull public @NonNull TimeUnit unit()
public long time()