public class TimeMeasure extends Object
| Modifier and Type | Field and Description |
|---|---|
TimeUnit |
unit
Measure unit of the time duration.
|
long |
value
Time duration at the selected TimeUnit.
|
| Constructor and Description |
|---|
TimeMeasure(long value,
TimeUnit unit)
Create an object that represent a time duration at a specific time unit.
|
| Modifier and Type | Method and Description |
|---|---|
long |
convert(TimeUnit toUnit)
Convert the time unit of current time duration.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
public final long value
public final TimeUnit unit
public TimeMeasure(long value,
@NonNull
TimeUnit unit)
value - Time duration at the selected TimeUnit.unit - Measure unit of the time duration.public long convert(@NonNull
TimeUnit toUnit)
toUnit - The new measure unit.