Java org.joda.time Duration fields, constructors, methods, implement or subclass

Example usage for Java org.joda.time Duration fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.joda.time Duration.

The text is from its open source code.

Implementation

org.joda.time.Duration has the following implementations.
Click this link to see all its implementation.

Field

DurationZERO
Constant representing zero millisecond duration

Constructor

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.

Method

intcompareTo(ReadableDuration other)
Compares this duration with the specified duration based on length and direction.
DurationdividedBy(long divisor)
Returns a new duration with this length divided by the specified divisor.
booleanequals(Object duration)
Compares this object with the specified object for equality based on the millisecond length.
longgetMillis()
Gets the length of this duration in milliseconds.
longgetStandardDays()
Gets the length of this duration in days assuming that there are the standard number of milliseconds in a day.
longgetStandardHours()
Gets the length of this duration in hours assuming that there are the standard number of milliseconds in an hour.
longgetStandardMinutes()
Gets the length of this duration in minutes assuming that there are the standard number of milliseconds in a minute.
longgetStandardSeconds()
Gets the length of this duration in seconds assuming that there are the standard number of milliseconds in a second.
inthashCode()
Gets a hash code for the duration that is compatible with the equals method.
booleanisEqual(ReadableDuration duration)
Is the length of this duration equal to the duration passed in.
booleanisLongerThan(ReadableDuration duration)
Is the length of this duration longer than the duration passed in.
booleanisShorterThan(ReadableDuration duration)
Is the length of this duration shorter than the duration passed in.
Durationmillis(long millis)
Create a duration with the specified number of milliseconds.
Durationminus(long amount)
Returns a new duration with this length minus that specified.
Durationminus(ReadableDuration amount)
Returns a new duration with this length minus that specified.
DurationmultipliedBy(long multiplicand)
Returns a new duration with this length multiplied by the specified multiplicand.
Durationnegated()
Returns a new duration with this length negated.
Durationparse(String str)
Parses a Duration from the specified string.
Durationplus(long amount)
Returns a new duration with this length plus that specified.
Durationplus(ReadableDuration amount)
Returns a new duration with this length plus that specified.
DurationstandardDays(long days)
Create a duration with the specified number of days assuming that there are the standard number of milliseconds in a day.
DurationstandardHours(long hours)
Create a duration with the specified number of hours assuming that there are the standard number of milliseconds in an hour.
DurationstandardMinutes(long minutes)
Create a duration with the specified number of minutes assuming that there are the standard number of milliseconds in a minute.
DurationstandardSeconds(long seconds)
Create a duration with the specified number of seconds assuming that there are the standard number of milliseconds in a second.
IntervaltoIntervalFrom(ReadableInstant startInstant)
Converts this duration to an Interval starting at the specified instant.
PeriodtoPeriod()
Converts this duration to a Period instance using the standard period type and the ISO chronology.
PeriodtoPeriodFrom(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.
DaystoStandardDays()
Converts this duration to a period in days assuming that there are the standard number of milliseconds in a day.
HourstoStandardHours()
Converts this duration to a period in hours assuming that there are the standard number of milliseconds in an hour.
MinutestoStandardMinutes()
Converts this duration to a period in minutes assuming that there are the standard number of milliseconds in a minute.
SecondstoStandardSeconds()
Converts this duration to a period in seconds assuming that there are the standard number of milliseconds in a second.
StringtoString()
Gets the value as a String in the ISO8601 duration format including only seconds and milliseconds.
DurationwithDurationAdded(long durationToAdd, int scalar)
Returns a new duration with this length plus that specified multiplied by the scalar.
DurationwithDurationAdded(ReadableDuration durationToAdd, int scalar)
Returns a new duration with this length plus that specified multiplied by the scalar.