public final class Duration
extends java.lang.Object
| Constructor and Description |
|---|
Duration(long duration)
The duration is defined by milliseconds.
|
Duration(long days,
int hours,
int minutes,
int seconds,
int milliseconds)
The interval is set by setting all the possible values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
long |
getDays()
Gets the days part of the duration.
|
int |
getHours()
Gets the hours part of the duration.
|
int |
getMilliseconds()
Gets the milliseconds part of the duration.
|
int |
getMinutes()
Gets the minutes part of the duration.
|
int |
getSeconds()
Gets the seconds part of the duration.
|
int |
hashCode() |
java.lang.String |
toString() |
public Duration(long days,
int hours,
int minutes,
int seconds,
int milliseconds)
days - Day(s).hours - Hour(s) in range [-23, 23].minutes - Minute(s) in range [-59, 59].seconds - Second(s) in range [-59, 59].milliseconds - Milliseconds in range [0, 999].public Duration(long duration)
duration - The duration in milliseconds.public long getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public int getMilliseconds()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object