public class TimeInterval
extends java.lang.Object
TimeUnit
The class also provides methods of retrieval of its value as a long in needed scale (milliseconds, seconds, minutes,
hours or days) see methods toMillis(), toSeconds() , toMinutes() , toHours() ,
toDays(),| Constructor and Description |
|---|
TimeInterval() |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.TimeUnit |
getTimeUnit()
TimeUnit getter |
long |
getValue()
Time interval numerical value getter (without time unit)
|
void |
setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
TimeUnit Setter
|
void |
setValue(long value)
Numerical value setter
|
long |
toDays()
returns long value of this TimeInterval in days
|
long |
toHours()
returns long value of this TimeInterval in hours
|
long |
toMillis()
returns long value of this TimeInterval in milliseconds
|
long |
toMinutes()
returns long value of this TimeInterval in minutes
|
long |
toSeconds()
returns long value of this TimeInterval in seconds
|
public long getValue()
public void setValue(long value)
value - public java.util.concurrent.TimeUnit getTimeUnit()
TimeUnit getterTimeUnit of this TimeIntervalpublic void setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
timeUnit - public long toMillis()
public long toSeconds()
public long toMinutes()
public long toHours()
public long toDays()