Uses of Class
java.time.Instant
-
Packages that use Instant 软件包 描述 java.lang 提供对Java编程语言设计至关重要的类。java.nio.file.attribute 提供对文件和文件系统属性的访问的接口和类。java.sql 提供使用Java™编程语言访问和处理存储在数据源(通常是关系数据库)中的数据的API。java.time 日期,时间,瞬间和持续时间的主要API。java.time.chrono 除默认ISO之外的日历系统的通用API。java.time.zone 支持时区及其规则。java.util 包含集合框架,一些国际化支持类,服务加载器,属性,随机数生成,字符串解析和扫描类,base64编码和解码,位数组和几个其他实用程序类。java.util.logging 提供Javaâ“2平台核心日志记录工具的类和接口。jdk.jfr 该软件包提供了用于创建事件和控制Flight Recorder的类。jdk.jfr.consumer 此程序包包含用于使用Flight Recorder数据的类。 -
-
Uses of Instant in java.lang
Methods in java.lang that return types with arguments of type Instant 变量和类型 方法 描述 Optional<Instant>ProcessHandle.Info. startInstant()返回进程的开始时间。 -
Uses of Instant in java.nio.file.attribute
Methods in java.nio.file.attribute that return Instant 变量和类型 方法 描述 InstantFileTime. toInstant()将此FileTime对象转换为Instant。Methods in java.nio.file.attribute with parameters of type Instant 变量和类型 方法 描述 static FileTimeFileTime. from(Instant instant)返回FileTime表示时间线上与提供的Instant对象相同的时间点值。 -
Uses of Instant in java.sql
Methods in java.sql that return Instant 变量和类型 方法 描述 InstantDate. toInstant()此方法始终抛出UnsupportedOperationException,不应使用,因为SQLDate值没有时间组件。InstantTime. toInstant()此方法始终抛出UnsupportedOperationException,不应使用,因为SQLTime值没有日期组件。InstantTimestamp. toInstant()将此Timestamp对象转换为Instant。Methods in java.sql with parameters of type Instant 变量和类型 方法 描述 static TimestampTimestamp. from(Instant instant)从Instant对象获得Timestamp的实例。 -
Uses of Instant in java.time
Fields in java.time declared as Instant 变量和类型 字段 描述 static InstantInstant. EPOCH1970-01-01T00:00:00Z时刻的常数。static InstantInstant. MAX支持的最大值为Instant,'1000000000-12-31T23:59:59.999999999Z'。static InstantInstant. MIN支持的最小值为Instant,' - 100000000000-01-01T00:00Z'。Methods in java.time that return Instant 变量和类型 方法 描述 static InstantInstant. from(TemporalAccessor temporal)从时态对象获得Instant的实例。abstract InstantClock. instant()获取时钟的当前瞬间。InstantInstant. minus(long amountToSubtract, TemporalUnit unit)返回此瞬间的副本,并减去指定的数量。InstantInstant. minus(TemporalAmount amountToSubtract)返回此瞬间的副本,并减去指定的数量。InstantInstant. minusMillis(long millisToSubtract)返回此瞬间的副本,并减去指定的持续时间(以毫秒为单位)。InstantInstant. minusNanos(long nanosToSubtract)返回此瞬间的副本,并减去指定的持续时间(以纳秒为单位)。InstantInstant. minusSeconds(long secondsToSubtract)返回此瞬间的副本,并减去指定的持续时间(以秒为单位)。static InstantInstant. now()从系统时钟获取当前瞬间。static InstantInstant. now(Clock clock)从指定时钟获取当前时刻。static InstantInstant. ofEpochMilli(long epochMilli)从1970-01-01T00:00:00Z的纪元使用毫秒获得Instant的实例。static InstantInstant. ofEpochSecond(long epochSecond)使用1970-01-01T00:00:00Z时代的秒数获得Instant的实例。static InstantInstant. ofEpochSecond(long epochSecond, long nanoAdjustment)使用1970-01-01T00:00:00Z的时间秒和秒的纳秒分数获得Instant的实例。static InstantInstant. parse(CharSequence text)从文本字符串(如2007-12-03T10:15:30.00Z获取Instant的实例。InstantInstant. plus(long amountToAdd, TemporalUnit unit)返回此瞬间的副本,并添加指定的数量。InstantInstant. plus(TemporalAmount amountToAdd)返回此瞬间的副本,并添加指定的数量。InstantInstant. plusMillis(long millisToAdd)返回此瞬间的副本,并添加指定的持续时间(以毫秒为单位)。InstantInstant. plusNanos(long nanosToAdd)返回此瞬间的副本,并添加指定的持续时间(以纳秒为单位)。InstantInstant. plusSeconds(long secondsToAdd)返回此瞬间的副本,并添加指定的持续时间(以秒为单位)。InstantOffsetDateTime. toInstant()将此日期时间转换为Instant。InstantInstant. truncatedTo(TemporalUnit unit)返回截断到指定单位的此Instant的副本。InstantInstant. with(TemporalAdjuster adjuster)返回此瞬间的调整副本。InstantInstant. with(TemporalField field, long newValue)返回此瞬间的副本,并将指定的字段设置为新值。Methods in java.time with parameters of type Instant 变量和类型 方法 描述 intInstant. compareTo(Instant otherInstant)将此瞬间与指定的瞬间进行比较。static ClockClock. fixed(Instant fixedInstant, ZoneId zone)获得一个始终返回同一时刻的时钟。booleanInstant. isAfter(Instant otherInstant)检查此瞬间是否在指定的瞬间之后。booleanInstant. isBefore(Instant otherInstant)检查此瞬间是否在指定的瞬间之前。static LocalDateLocalDate. ofInstant(Instant instant, ZoneId zone)从Instant和区域ID获得LocalDate的实例。static LocalDateTimeLocalDateTime. ofInstant(Instant instant, ZoneId zone)从Instant和区域ID获得LocalDateTime的实例。static LocalTimeLocalTime. ofInstant(Instant instant, ZoneId zone)从Instant和区域ID获取LocalTime的实例。static OffsetDateTimeOffsetDateTime. ofInstant(Instant instant, ZoneId zone)从Instant和区域ID获得OffsetDateTime的实例。static OffsetTimeOffsetTime. ofInstant(Instant instant, ZoneId zone)从Instant和区域ID获得OffsetTime的实例。static ZonedDateTimeZonedDateTime. ofInstant(Instant instant, ZoneId zone)从Instant获得ZonedDateTime的实例。 -
Uses of Instant in java.time.chrono
Methods in java.time.chrono that return Instant 变量和类型 方法 描述 default InstantChronoLocalDateTime. toInstant(ZoneOffset offset)将此日期时间转换为Instant。default InstantChronoZonedDateTime. toInstant()将此日期时间转换为Instant。Methods in java.time.chrono with parameters of type Instant 变量和类型 方法 描述 default ChronoZonedDateTime<? extends ChronoLocalDate>Chronology. zonedDateTime(Instant instant, ZoneId zone)获得ChronoZonedDateTime在从这个年表Instant。ZonedDateTimeIsoChronology. zonedDateTime(Instant instant, ZoneId zone)从Instant获得此年代表中的ISO分区日期时间。 -
Uses of Instant in java.time.zone
Methods in java.time.zone that return Instant 变量和类型 方法 描述 InstantZoneOffsetTransition. getInstant()获取转换瞬间。Methods in java.time.zone with parameters of type Instant 变量和类型 方法 描述 DurationZoneRules. getDaylightSavings(Instant instant)获取此区域中指定时刻使用的夏令时量。ZoneOffsetZoneRules. getOffset(Instant instant)获取这些规则中指定时刻适用的偏移量。ZoneOffsetZoneRules. getStandardOffset(Instant instant)获取此区域中指定时刻的标准偏移量。booleanZoneRules. isDaylightSavings(Instant instant)检查指定的瞬间是否在夏令时中。ZoneOffsetTransitionZoneRules. nextTransition(Instant instant)获取指定时刻之后的下一个转换。ZoneOffsetTransitionZoneRules. previousTransition(Instant instant)获取指定时刻之前的上一个转换。 -
Uses of Instant in java.util
Methods in java.util that return Instant 变量和类型 方法 描述 InstantCalendar. toInstant()将此对象转换为Instant。InstantDate. toInstant()将此Date对象转换为Instant。Methods in java.util with parameters of type Instant 变量和类型 方法 描述 static DateDate. from(Instant instant)从Instant对象获得Date的实例。 -
Uses of Instant in java.util.logging
Methods in java.util.logging that return Instant 变量和类型 方法 描述 InstantLogRecord. getInstant()获取事件发生的瞬间。Methods in java.util.logging with parameters of type Instant 变量和类型 方法 描述 voidLogRecord. setInstant(Instant instant)设置事件发生的瞬间。 -
Uses of Instant in jdk.jfr
Methods in jdk.jfr that return Instant 变量和类型 方法 描述 InstantRecording. getStartTime()返回此录制开始的时间。InstantRecording. getStopTime()返回此录制停止的时间。Methods in jdk.jfr with parameters of type Instant 变量和类型 方法 描述 InputStreamRecording. getStream(Instant start, Instant end)创建指定时间间隔的数据流。 -
Uses of Instant in jdk.jfr.consumer
Methods in jdk.jfr.consumer that return Instant 变量和类型 方法 描述 InstantRecordedEvent. getEndTime()返回事件的结束时间。InstantRecordedObject. getInstant(String name)返回时间戳字段的值。InstantRecordedEvent. getStartTime()返回事件的开始时间。
-