public interface Duration extends java.io.Serializable, java.lang.Comparable<Duration>
Modifier and Type | Method and Description |
---|---|
Duration |
absoluteValue()
Returns the absolute value of this duration.
|
Duration |
divide(double scalar)
Divides this duration by the given scalar value and returns the result.
|
double |
divide(Duration other)
Divides this duration by the given duration and returns the ratio.
|
boolean |
equals(Duration other)
Determines if this duration is equivalent to the given duration.
|
long |
getDaysPart()
Gets the standard minutes part of the time.
|
int |
getHoursPart()
Gets the standard hours part of the time.
|
int |
getMillisecondsPart()
Gets the standard milliseconds part of the time.
|
int |
getMinutesPart()
Gets the standard minutes part of the time.
|
int |
getSecondsPart()
Gets the standard seconds part of the time.
|
double |
getTotalDays()
Gets the total number of standard days of this duration.
|
double |
getTotalHours()
Gets the total number of standard hours of this duration.
|
double |
getTotalMilliseconds()
Gets the total number of standard milliseconds of this duration.
|
double |
getTotalMinutes()
Gets the total number of standard minutes of this duration.
|
double |
getTotalSeconds()
Gets the total number of standard seconds of this duration.
|
Duration |
minus(Duration other)
Subtracts the given duration from this duration and returns the
difference.
|
Duration |
negative()
Returns the negative of this duration.
|
Duration |
plus(Duration other)
Adds this duration to the given duration and returns the sum.
|
Duration |
times(double scalar)
Multiplies this duration by the given scalar value and returns the
product.
|
Duration negative()
Duration absoluteValue()
boolean equals(Duration other)
other
- The other duration.Duration plus(Duration other)
other
- The other duration.Duration minus(Duration other)
other
- The other duration.Duration times(double scalar)
scalar
- The scalar value.double divide(Duration other)
other
- The other duration.Duration divide(double scalar)
scalar
- The scalar value.double getTotalMilliseconds()
double getTotalSeconds()
double getTotalMinutes()
double getTotalHours()
double getTotalDays()
int getMillisecondsPart()
int getSecondsPart()
int getMinutesPart()
int getHoursPart()
long getDaysPart()