public class Duration
extends java.lang.Object
Constructor and Description |
---|
Duration() |
Duration(long time,
java.util.concurrent.TimeUnit unit) |
Duration(java.lang.String string) |
Modifier and Type | Method and Description |
---|---|
Duration |
add(Duration that) |
boolean |
equals(java.lang.Object o) |
long |
getTime() |
long |
getTime(java.util.concurrent.TimeUnit unit) |
java.util.concurrent.TimeUnit |
getUnit() |
static Duration |
parse(java.lang.String text) |
void |
setTime(long time) |
void |
setUnit(java.util.concurrent.TimeUnit unit) |
Duration |
subtract(Duration that) |
java.lang.String |
toString() |
public Duration()
public Duration(long time, java.util.concurrent.TimeUnit unit)
public Duration(java.lang.String string)
public long getTime()
public long getTime(java.util.concurrent.TimeUnit unit)
public void setTime(long time)
public java.util.concurrent.TimeUnit getUnit()
public void setUnit(java.util.concurrent.TimeUnit unit)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public static Duration parse(java.lang.String text)
public java.lang.String toString()
toString
in class java.lang.Object