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() |
boolean |
greaterOrEqualTo(Duration that) |
boolean |
greaterThan(Duration that) |
boolean |
lessOrEqualTo(Duration that) |
boolean |
lessThan(Duration that) |
static Duration |
max(Duration a,
Duration b) |
static Duration |
min(Duration a,
Duration b) |
Duration |
multiply(long n) |
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 Duration multiply(long n)
public boolean greaterThan(Duration that)
public boolean greaterOrEqualTo(Duration that)
public boolean lessThan(Duration that)
public boolean lessOrEqualTo(Duration that)
public static Duration parse(java.lang.String text)
public java.lang.String toString()
toString
in class java.lang.Object