public class Duration extends Object
org.joda.time.Duration.| Modifier and Type | Field and Description |
|---|---|
static com.google.common.collect.ImmutableBiMap<TimeUnit,String> |
UNITS |
| Constructor and Description |
|---|
Duration(long value,
TimeUnit timeUnit)
Create a new instance.
|
Duration(String duration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
TimeUnit |
getTimeUnit() |
long |
getValue() |
int |
hashCode() |
long |
toMillis() |
String |
toString() |
public Duration(long value,
TimeUnit timeUnit)
value - amount of timetimeUnit - time unit, cannot be null, must be one of the valid unitspublic Duration(String duration)
public long getValue()
public TimeUnit getTimeUnit()
public long toMillis()
Copyright © 2014–2018 Red Hat, Inc.. All rights reserved.