Uses of Class
javax.time.Instant
Packages that use Instant
Package
Description
Provides classes to manage the continuous time scale including a wrapper
for the system clock.
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
Provides classes to implement time-zones and their rules.
-
Uses of Instant in javax.time
Fields in javax.time declared as InstantModifier and TypeFieldDescriptionstatic final Instant
Instant.EPOCH
Constant for the 1970-01-01T00:00:00Z epoch instant.private final Instant
TimeSource.FixedTimeSource.instant
The fixed instant to return.Methods in javax.time that return InstantModifier and TypeMethodDescriptionprotected Instant
UTCRules.convertToInstant
(UTCInstant utcInstant) Converts aUTCInstant
to anInstant
.private static Instant
Instant.create
(long seconds, int nanoOfSecond) Obtains an instance ofInstant
using seconds and nanoseconds.TimeSource.FixedTimeSource.instant()
Gets the currentInstant
.abstract Instant
TimeSource.instant()
Gets the currentInstant
.TimeSource.OffsetSystemTimeSource.instant()
Gets the currentInstant
.TimeSource.SystemTimeSource.instant()
Gets the currentInstant
.Returns a copy of this duration with the specified duration subtracted.Returns a copy of this instant with the specified duration subtracted.Instant.minusMillis
(long millisToSubtract) Returns a copy of this instant with the specified duration in milliseconds subtracted.Instant.minusNanos
(long nanosToSubtract) Returns a copy of this instant with the specified duration in nanoseconds subtracted.Instant.minusSeconds
(long secondsToSubtract) Returns a copy of this instant with the specified duration in seconds subtracted.static Instant
Instant.now()
Obtains the current instant from the system time-source in the default time-zone.static Instant
Instant.now
(TimeSource timeSource) Obtains the current instant from the specified clock.static Instant
Instant.of
(InstantProvider instantProvider) Obtains an instance ofInstant
from a provider of instants.static Instant
Instant.ofEpochMillis
(long epochMillis) Obtains an instance ofInstant
using milliseconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Instant.ofEpochNanos
(long epochNanos) Obtains an instance ofInstant
using nanoseconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Instant.ofEpochNanos
(BigInteger epochNanos) Obtains an instance ofInstant
using nanoseconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Instant.ofEpochSeconds
(long epochSeconds) Obtains an instance ofInstant
using seconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Instant.ofEpochSeconds
(long epochSeconds, long nanoAdjustment) Obtains an instance ofInstant
using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second.static Instant
Instant.ofEpochSeconds
(BigDecimal epochSeconds) Obtains an instance ofInstant
using seconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Obtains an instance ofInstant
by parsing a string.private Instant
Instant.plus
(long secondsToAdd, long nanosToAdd) Returns a copy of this instant with the specified duration added.Returns a copy of this duration with the specified duration added.Returns a copy of this instant with the specified duration added.Instant.plusMillis
(long millisToAdd) Returns a copy of this instant with the specified duration in milliseconds added.Instant.plusNanos
(long nanosToAdd) Returns a copy of this instant with the specified duration in nanoseconds added.Instant.plusSeconds
(long secondsToAdd) Returns a copy of this instant with the specified duration in seconds added.Instant.toInstant()
Converts this instant to anInstant
, trivially returningthis
.InstantProvider.toInstant()
Returns an instance ofInstant
initialized from the state of this object.TAIInstant.toInstant()
Converts this instant to anInstant
using the system default leap second rules.UTCInstant.toInstant()
Converts this instant to anInstant
using the system default leap second rules.Methods in javax.time with parameters of type InstantModifier and TypeMethodDescriptionint
Compares this instant to the specified instant.protected UTCInstant
UTCRules.convertToUTC
(Instant instant) Converts anInstant
to aUTCInstant
.boolean
Checks if this instant is after the specified instant.boolean
Checks if this instant is before the specified instant.static TAIInstant
Obtains an instance ofTAIInstant
from anInstant
using the system default leap second rules.static UTCInstant
Obtains an instance ofUTCInstant
from a provider of instants using the system default leap second rules.static UTCInstant
Obtains an instance ofUTCInstant
from a provider of instants using the specified leap second rules.Constructors in javax.time with parameters of type InstantModifierConstructorDescriptionprivate
FixedTimeSource
(Instant fixedInstant) Restricted constructor. -
Uses of Instant in javax.time.calendar
Methods in javax.time.calendar that return Instant -
Uses of Instant in javax.time.calendar.zone
Methods in javax.time.calendar.zone that return InstantMethods in javax.time.calendar.zone with parameters of type InstantModifier and TypeMethodDescriptionZoneRules.getOffsetInfo
(Instant instant) Gets the offset information for the specified instant in this zone.