Example usage for Java org.joda.time Duration fields, constructors, methods, implement or subclass
The text is from its open source code.
Duration | ZERO Constant representing zero millisecond duration |
Duration(long duration) Creates a duration from the given millisecond duration. | |
Duration(Object duration) Creates a duration from the specified object using the org.joda.time.convert.ConverterManager ConverterManager . | |
Duration(long startInstant, long endInstant) Creates a duration from the given interval endpoints. | |
Duration(ReadableInstant start, ReadableInstant end) Creates a duration from the given interval endpoints. |
int | compareTo(ReadableDuration other) Compares this duration with the specified duration based on length and direction. |
Duration | dividedBy(long divisor) Returns a new duration with this length divided by the specified divisor. |
boolean | equals(Object duration) Compares this object with the specified object for equality based on the millisecond length. |
long | getMillis() Gets the length of this duration in milliseconds. |
long | getStandardDays() Gets the length of this duration in days assuming that there are the standard number of milliseconds in a day. |
long | getStandardHours() Gets the length of this duration in hours assuming that there are the standard number of milliseconds in an hour. |
long | getStandardMinutes() Gets the length of this duration in minutes assuming that there are the standard number of milliseconds in a minute. |
long | getStandardSeconds() Gets the length of this duration in seconds assuming that there are the standard number of milliseconds in a second. |
int | hashCode() Gets a hash code for the duration that is compatible with the equals method. |
boolean | isEqual(ReadableDuration duration) Is the length of this duration equal to the duration passed in. |
boolean | isLongerThan(ReadableDuration duration) Is the length of this duration longer than the duration passed in. |
boolean | isShorterThan(ReadableDuration duration) Is the length of this duration shorter than the duration passed in. |
Duration | millis(long millis) Create a duration with the specified number of milliseconds. |
Duration | minus(long amount) Returns a new duration with this length minus that specified. |
Duration | minus(ReadableDuration amount) Returns a new duration with this length minus that specified. |
Duration | multipliedBy(long multiplicand) Returns a new duration with this length multiplied by the specified multiplicand. |
Duration | negated() Returns a new duration with this length negated. |
Duration | parse(String str) Parses a Duration from the specified string. |
Duration | plus(long amount) Returns a new duration with this length plus that specified. |
Duration | plus(ReadableDuration amount) Returns a new duration with this length plus that specified. |
Duration | standardDays(long days) Create a duration with the specified number of days assuming that there are the standard number of milliseconds in a day. |
Duration | standardHours(long hours) Create a duration with the specified number of hours assuming that there are the standard number of milliseconds in an hour. |
Duration | standardMinutes(long minutes) Create a duration with the specified number of minutes assuming that there are the standard number of milliseconds in a minute. |
Duration | standardSeconds(long seconds) Create a duration with the specified number of seconds assuming that there are the standard number of milliseconds in a second. |
Interval | toIntervalFrom(ReadableInstant startInstant) Converts this duration to an Interval starting at the specified instant. |
Period | toPeriod() Converts this duration to a Period instance using the standard period type and the ISO chronology. |
Period | toPeriodFrom(ReadableInstant startInstant) Converts this duration to a Period instance by adding the duration to a start instant to obtain an interval using the standard period type. |
Days | toStandardDays() Converts this duration to a period in days assuming that there are the standard number of milliseconds in a day. |
Hours | toStandardHours() Converts this duration to a period in hours assuming that there are the standard number of milliseconds in an hour. |
Minutes | toStandardMinutes() Converts this duration to a period in minutes assuming that there are the standard number of milliseconds in a minute. |
Seconds | toStandardSeconds() Converts this duration to a period in seconds assuming that there are the standard number of milliseconds in a second. |
String | toString() Gets the value as a String in the ISO8601 duration format including only seconds and milliseconds. |
Duration | withDurationAdded(long durationToAdd, int scalar) Returns a new duration with this length plus that specified multiplied by the scalar. |
Duration | withDurationAdded(ReadableDuration durationToAdd, int scalar) Returns a new duration with this length plus that specified multiplied by the scalar. |