| Package | Description |
|---|---|
| org.threeten.bp |
The main API for dates, times, instants, and durations.
|
| org.threeten.bp.temporal |
Access to date and time using fields and units, plus additional value type classes.
|
| org.threeten.bp.zone |
Support for time-zones and their rules.
|
| Modifier and Type | Field and Description |
|---|---|
static Duration |
Duration.ZERO
Constant for a duration of zero.
|
| Modifier and Type | Method and Description |
|---|---|
Duration |
Duration.abs()
Returns a copy of this duration with a positive length.
|
static Duration |
Duration.between(TemporalAccessor startInclusive,
TemporalAccessor endExclusive)
Obtains an instance of
Duration representing the duration between two instants. |
Duration |
Duration.dividedBy(long divisor)
Returns a copy of this duration divided by the specified value.
|
Duration |
Duration.minus(Duration duration)
Returns a copy of this duration with the specified duration subtracted.
|
Duration |
Duration.minus(long amountToSubtract,
TemporalUnit unit)
Returns a copy of this duration with the specified duration subtracted.
|
Duration |
Duration.minusMillis(long millisToSubtract)
Returns a copy of this duration with the specified duration in milliseconds subtracted.
|
Duration |
Duration.minusNanos(long nanosToSubtract)
Returns a copy of this duration with the specified duration in nanoseconds subtracted.
|
Duration |
Duration.minusSeconds(long secondsToSubtract)
Returns a copy of this duration with the specified duration in seconds subtracted.
|
Duration |
Duration.multipliedBy(long multiplicand)
Returns a copy of this duration multiplied by the scalar.
|
Duration |
Duration.negated()
Returns a copy of this duration with the length negated.
|
static Duration |
Duration.of(long amount,
TemporalUnit unit)
Obtains an instance of
Duration from a duration in the specified unit. |
static Duration |
Duration.ofDays(long days)
Obtains an instance of
Duration from a number of standard 24 hour days. |
static Duration |
Duration.ofHours(long hours)
Obtains an instance of
Duration from a number of standard length hours. |
static Duration |
Duration.ofMillis(long millis)
Obtains an instance of
Duration from a number of milliseconds. |
static Duration |
Duration.ofMinutes(long minutes)
Obtains an instance of
Duration from a number of standard length minutes. |
static Duration |
Duration.ofNanos(long nanos)
Obtains an instance of
Duration from a number of nanoseconds. |
static Duration |
Duration.ofSeconds(long seconds)
Obtains an instance of
Duration from a number of seconds. |
static Duration |
Duration.ofSeconds(long seconds,
long nanoAdjustment)
Obtains an instance of
Duration from a number of seconds
and an adjustment in nanoseconds. |
static Duration |
Duration.parse(CharSequence text)
Obtains an instance of
Duration by parsing a text string. |
Duration |
Duration.plus(Duration duration)
Returns a copy of this duration with the specified duration added.
|
Duration |
Duration.plus(long amountToAdd,
TemporalUnit unit)
Returns a copy of this duration with the specified duration added.
|
Duration |
Duration.plusMillis(long millisToAdd)
Returns a copy of this duration with the specified duration in milliseconds added.
|
Duration |
Duration.plusNanos(long nanosToAdd)
Returns a copy of this duration with the specified duration in nanoseconds added.
|
Duration |
Duration.plusSeconds(long secondsToAdd)
Returns a copy of this duration with the specified duration in seconds added.
|
Duration |
Period.toDuration()
Calculates the duration of this period.
|
| Modifier and Type | Method and Description |
|---|---|
int |
Duration.compareTo(Duration otherDuration)
Compares this duration to the specified
Duration. |
boolean |
Duration.isGreaterThan(Duration otherDuration)
Checks if this duration is greater than the specified
Duration. |
boolean |
Duration.isLessThan(Duration otherDuration)
Checks if this duration is less than the specified
Duration. |
Duration |
Duration.minus(Duration duration)
Returns a copy of this duration with the specified duration subtracted.
|
static Period |
Period.of(Duration duration)
Obtains a
Period from a Duration. |
static Clock |
Clock.offset(Clock baseClock,
Duration offsetDuration)
Obtains a clock that returns instants from the specified clock with the
specified duration added
|
Duration |
Duration.plus(Duration duration)
Returns a copy of this duration with the specified duration added.
|
static Clock |
Clock.tick(Clock baseClock,
Duration tickDuration)
Obtains a clock that returns instants from the specified clock truncated
to the nearest occurrence of the specified duration.
|
| Modifier and Type | Method and Description |
|---|---|
Duration |
TemporalUnit.getDuration()
Gets the duration of this unit, which may be an estimate.
|
Duration |
ChronoUnit.getDuration()
Gets the estimated duration of this unit in the ISO calendar system.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Duration |
ZoneRules.getDaylightSavings(Instant instant)
Gets the amount of daylight savings in use for the specified instant in this zone.
|
Duration |
ZoneOffsetTransition.getDuration()
Gets the duration of the transition.
|
Copyright © 2007-2013 ThreeTen.org. All Rights Reserved.