Package | Description |
---|---|
javax.time |
Provides classes to manage the continuous time scale including a wrapper
for the system clock.
|
javax.time.calendar |
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
|
Modifier and Type | Field | Description |
---|---|---|
static Duration |
Duration.ZERO |
Constant for a duration of zero.
|
Modifier and Type | Method | Description |
---|---|---|
Duration |
Duration.abs() |
Returns a copy of this duration with a positive length.
|
static Duration |
Duration.between(InstantProvider startInclusive,
InstantProvider 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 |
TAIInstant.durationUntil(TAIInstant taiInstant) |
Returns the duration between this instant and the specified instant.
|
Duration |
UTCInstant.durationUntil(UTCInstant utcInstant) |
Returns the duration between this instant and the specified instant.
|
Duration |
Duration.minus(long amount,
TimeUnit unit) |
Returns a copy of this duration with the specified duration subtracted.
|
Duration |
Duration.minus(Duration duration) |
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 number of milliseconds subtracted.
|
Duration |
Duration.minusNanos(long nanosToSubtract) |
Returns a copy of this duration with the specified number of nanoseconds subtracted.
|
Duration |
Duration.minusSeconds(long secondsToSubtract) |
Returns a copy of this duration with the specified number of 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,
TimeUnit unit) |
Obtains an instance of
Duration from a duration in a specified time unit. |
static Duration |
Duration.ofMillis(long millis) |
Obtains an instance of
Duration from a number of milliseconds. |
static Duration |
Duration.ofNanos(long nanos) |
Obtains an instance of
Duration from a number of nanoseconds. |
static Duration |
Duration.ofNanos(BigInteger 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.ofSeconds(BigDecimal seconds) |
Obtains an instance of
Duration from a number of seconds. |
static Duration |
Duration.ofStandardDays(long days) |
Obtains an instance of
Duration from a number of standard length days. |
static Duration |
Duration.ofStandardHours(long hours) |
Obtains an instance of
Duration from a number of standard length hours. |
static Duration |
Duration.ofStandardMinutes(long minutes) |
Obtains an instance of
Duration from a number of standard length minutes. |
static Duration |
Duration.parse(String text) |
Obtains an instance of
Duration by parsing a string. |
Duration |
Duration.plus(long amount,
TimeUnit unit) |
Returns a copy of this duration with the specified duration added.
|
Duration |
Duration.plus(Duration duration) |
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 number of milliseconds added.
|
Duration |
Duration.plusNanos(long nanosToAdd) |
Returns a copy of this duration with the specified number of nanoseconds added.
|
Duration |
Duration.plusSeconds(long secondsToAdd) |
Returns a copy of this duration with the specified number of seconds added.
|
Modifier and Type | Method | 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. |
Instant |
Instant.minus(Duration duration) |
Returns a copy of this instant with the specified duration subtracted.
|
TAIInstant |
TAIInstant.minus(Duration duration) |
Returns a copy of this instant with the specified duration subtracted.
|
UTCInstant |
UTCInstant.minus(Duration duration) |
Returns a copy of this instant with the specified duration subtracted.
|
static TimeSource |
TimeSource.offsetSystem(Duration offset) |
Gets a time-source that obtains the current instant using the system
millisecond clock and adjusts by a fixed offset.
|
Duration |
Duration.plus(Duration duration) |
Returns a copy of this duration with the specified
Duration added. |
Instant |
Instant.plus(Duration duration) |
Returns a copy of this instant with the specified duration added.
|
TAIInstant |
TAIInstant.plus(Duration duration) |
Returns a copy of this instant with the specified duration added.
|
UTCInstant |
UTCInstant.plus(Duration duration) |
Returns a copy of this instant with the specified duration added.
|
Modifier and Type | Method | Description |
---|---|---|
Duration |
PeriodUnit.getEstimatedDuration() |
Gets an estimate of the duration of the unit in seconds.
|
Duration |
Period.toDuration() |
Calculates the accurate duration of this period.
|
Duration |
PeriodField.toDuration() |
Calculates the accurate duration of this period.
|
Duration |
PeriodFields.toDuration() |
Calculates the accurate duration of this period.
|
Duration |
Period.toDurationWith24HourDays() |
Calculates the accurate duration of this period.
|
Duration |
Period.toEstimatedDuration() |
Estimates the duration of this period.
|
Duration |
PeriodField.toEstimatedDuration() |
Estimates the duration of this period.
|
Duration |
PeriodFields.toEstimatedDuration() |
Estimates the duration of this period.
|
Modifier and Type | Method | Description |
---|---|---|
LocalDateTime |
LocalDateTime.minus(Duration duration) |
Returns a copy of this
LocalDateTime with the specified duration subtracted. |
LocalTime |
LocalTime.minus(Duration duration) |
Returns a copy of this
LocalTime with the specified duration subtracted. |
OffsetDateTime |
OffsetDateTime.minus(Duration duration) |
Returns a copy of this
OffsetDateTime with the specified duration subtracted. |
OffsetTime |
OffsetTime.minus(Duration duration) |
Returns a copy of this
OffsetTime with the specified duration subtracted. |
ZonedDateTime |
ZonedDateTime.minusDuration(Duration duration) |
Returns a copy of this
ZonedDateTime with the specified duration subtracted. |
static Period |
Period.of(Duration duration) |
Obtains a
Period from a Duration . |
static PeriodFields |
PeriodFields.of(Duration duration) |
Obtains a
PeriodFields from a Duration based on the standard
durations of seconds and nanoseconds. |
LocalDateTime |
LocalDateTime.plus(Duration duration) |
Returns a copy of this
LocalDateTime with the specified duration added. |
LocalTime |
LocalTime.plus(Duration duration) |
Returns a copy of this
LocalTime with the specified duration added. |
OffsetDateTime |
OffsetDateTime.plus(Duration duration) |
Returns a copy of this
OffsetDateTime with the specified duration added. |
OffsetTime |
OffsetTime.plus(Duration duration) |
Returns a copy of this
OffsetTime with the specified duration added. |
ZonedDateTime |
ZonedDateTime.plusDuration(Duration duration) |
Returns a copy of this
ZonedDateTime with the specified duration added. |
Constructor | Description |
---|---|
PeriodUnit(String name,
Duration estimatedDuration) |
Constructor to create a base unit that cannot be derived.
|
Copyright © 2019. All rights reserved.