abs() |
This method returns positive copy of length |
addTo(Temporal temporal) |
This method adds this duration to the specified temporal object. |
Duration between(Temporal startInclusive, Temporal endExclusive) |
This method finds the duration between two Temporal objects. |
compareTo(Duration otherDuration) |
This method compares this duration to the specified Duration. |
dividedBy(long divisor) |
This method returns a copy of this duration divided by the specified value. |
equals(Object otherDuration) |
This method checks if this duration is equal to the specified Duration. |
from(TemporalAmount amount) |
This method obtains an instance of Duration from a temporal amount. |
get(TemporalUnit unit) |
This method gets the value of the requested unit. |
getNano() |
This method gets the number of nanoseconds within the second in this duration. |
getSeconds() |
This method gets the number of seconds in this duration. |
getUnits() |
This method gets the set of units supported by this duration. |
hashCode() |
A hash code for this duration. |
isNegative() |
This method checks if this duration is negative, excluding zero. |
isZero() |
This method checks if this duration is zero length. |
minus(Duration duration) |
This method returns a copy of this duration with the specified duration subtracted. |
minus(long amountToSubtract, TemporalUnit unit) |
This method returns a copy of this duration with the specified duration subtracted. |
minusDays(long daysToSubtract) |
This method returns a copy of this duration with the specified duration in standard 24-hour days subtracted. |
minusHours(long hoursToSubtract) |
This method returns a copy of this duration with the specified duration in hours subtracted. |
minusMillis(long millisToSubtract) |
This method returns a copy of this duration with the specified duration in milliseconds subtracted. |
minusMinutes(long minutesToSubtract) |
This method returns a copy of this duration with the specified duration in minutes subtracted. |
minusNanos(long nanosToSubtract) |
This method returns a copy of this duration with the specified duration in nanoseconds subtracted. |
minusSeconds(long secondsToSubtract) |
This method returns a copy of this duration with the specified duration in seconds subtracted. |
multipliedBy(long multiplicand) |
This method returns a copy of this duration multiplied by the scalar. |
negated() |
This method returns a copy of this duration with the length negated. |
of(long amount, TemporalUnit unit) |
This method obtains a Duration representing an amount in the specified unit. |
ofDays(long days) |
This method obtains a Duration representing a number of standard 24 hour days. |
ofHours(long hours) |
This method obtains a Duration representing a number of standard hours. |
ofMillis(long millis) |
This method obtains a Duration representing a number of milliseconds. |
ofMinutes(long minutes) |
This method obtains a Duration representing a number of standard minutes. |
ofNanos(long nanos) |
This method obtains a Duration representing a number of nanoseconds. |
ofSeconds(long seconds) |
This method obtains a Duration representing a number of seconds. |
ofSeconds(long seconds, long nanoAdjustment) |
This method obtains a Duration representing a number of seconds and an adjustment in nanoseconds. |
parse(CharSequence text) |
This method obtains a Duration from a text string such as PnDTnHnMn.nS. |
plus(Duration duration) |
This method returns a copy of this duration with the specified duration added. |
plus(long amountToAdd, TemporalUnit unit) |
This method returns a copy of this duration with the specified duration added. |
plusDays(long daysToAdd) |
This method returns a copy of this duration with the specified duration in standard 24 hour days added. |
plusHours(long hoursToAdd) |
This method returns a copy of this duration with the specified duration in hours added. |
plusMillis(long millisToAdd) |
This method returns a copy of this duration with the specified duration in milliseconds added. |
plusMinutes(long minutesToAdd) |
This method returns a copy of this duration with the specified duration in minutes added. |
plusNanos(long nanosToAdd) |
This method returns a copy of this duration with the specified duration in nanoseconds added. |
plusSeconds(long secondsToAdd) |
This method returns a copy of this duration with the specified duration in seconds added. |
subtractFrom(Temporal temporal) |
This method subtracts this duration from the specified temporal object. |
toDays() |
This method gets the number of days in this duration. |
toHours() |
This method gets the number of hours in this duration. |
toMillis() |
This method converts this duration to the total length in milliseconds. |
toMinutes() |
This method gets the number of minutes in this duration. |
toNanos() |
This method converts this duration to the total length in nanoseconds expressed as a long. |
toString() |
A string representation of this duration using ISO-8601 seconds based representation, such as PT8H6M12.345S. |
withNanos(int nanoOfSecond) |
This method returns a copy of this duration with the specified nano-of-second. |
withSeconds(long seconds) |
This method returns a copy of this duration with the specified amount of seconds. |