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 duration 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.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic long in(java.util.concurrent.TimeUnit unit)
unit - The time unit to convert to.