public class Duration
extends java.lang.Object
Constructor and Description |
---|
Duration(long time,
java.util.concurrent.TimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
long |
in(java.util.concurrent.TimeUnit unit)
Converts this durtation to the given unit of time.
|
java.lang.String |
toString() |
public Duration(long time, java.util.concurrent.TimeUnit unit)
time
- The amount of time.unit
- The unit of time.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public long in(java.util.concurrent.TimeUnit unit)
unit
- The time unit to convert to.