软件包 | 描述 |
---|---|
java.nio.file.attribute |
提供对文件和文件系统属性的访问的接口和类。
|
java.sql |
提供的API来访问和处理的数据存储在数据源(通常是一个关系数据库)使用java编程语言
TM。
|
java.time |
日期、时间、时刻主要的API,和持续时间。
|
java.time.chrono |
除了默认的标准以外的日历系统的通用的。
|
java.time.zone |
支持时区及其规则。
|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
Modifier and Type | Method and Description |
---|---|
Instant |
FileTime.toInstant()
将这一
Instant
FileTime 对象。
|
Modifier and Type | Method and Description |
---|---|
static FileTime |
FileTime.from(Instant instant)
返回一个
FileTime 代表同一时间点的价值在时间线提供的
Instant 对象。
|
Modifier and Type | Method and Description |
---|---|
Instant |
Time.toInstant()
此方法总是总是抛出UnsupportedOperationException,不应该因为SQL
Time 值没有日期。
|
Instant |
Timestamp.toInstant()
将这一
Instant
Timestamp 对象。
|
Instant |
Date.toInstant()
此方法总是总是抛出UnsupportedOperationException,不应该因为SQL
Date 值没有时间成分。
|
Modifier and Type | Method and Description |
---|---|
static Timestamp |
Timestamp.from(Instant instant)
获得
Timestamp 实例从一个
Instant 对象。
|
Modifier and Type | Field and Description |
---|---|
static Instant |
Instant.EPOCH
为1970-01-01t00:00:00z时代即时常数。
|
static Instant |
Instant.MAX
最大支持999999999
Instant ,“1000000000-12-31t23:59:59. z。
|
static Instant |
Instant.MIN
最小支持
Instant ,”1000000000-01-01t00:00z”。
|
Modifier and Type | Method and Description |
---|---|
static Instant |
Instant.from(TemporalAccessor temporal)
获得
Instant 实例从一个时空对象。
|
abstract Instant |
Clock.instant()
获取时钟的当前时刻。
|
Instant |
Instant.minus(long amountToSubtract, TemporalUnit unit)
返回一个与指定的金额减去这一瞬间的副本。
|
Instant |
Instant.minus(TemporalAmount amountToSubtract)
返回一个与指定的金额减去这一瞬间的副本。
|
Instant |
Instant.minusMillis(long millisToSubtract)
返回一个与指定的持续时间在毫秒减去一个副本。
|
Instant |
Instant.minusNanos(long nanosToSubtract)
返回一份本即时来减去指定的时间。
|
Instant |
Instant.minusSeconds(long secondsToSubtract)
返回一个与指定的持续时间在秒减去一个副本。
|
static Instant |
Instant.now()
从系统时钟中获得当前时刻。
|
static Instant |
Instant.now(Clock clock)
从指定的时钟中获得当前时刻。
|
static Instant |
Instant.ofEpochMilli(long epochMilli)
获得由1970-01-01t00:00:00z时代毫秒
Instant 实例。
|
static Instant |
Instant.ofEpochSecond(long epochSecond)
得到一个实例
Instant 使用从1970-01-01t00:00:00z时代秒。
|
static Instant |
Instant.ofEpochSecond(long epochSecond, long nanoAdjustment)
获得由1970-01-01t00:00:00z和二纳秒分数时代秒
Instant 实例。
|
static Instant |
Instant.parse(CharSequence text)
获得
Instant 实例从一个文本字符串,如
2007-12-03T10:15:30.00Z 。
|
Instant |
Instant.plus(long amountToAdd, TemporalUnit unit)
返回此即时的副本与指定的金额添加。
|
Instant |
Instant.plus(TemporalAmount amountToAdd)
返回此即时的副本与指定的金额添加。
|
Instant |
Instant.plusMillis(long millisToAdd)
返回此即时的副本,以指定的持续时间在毫秒添加。
|
Instant |
Instant.plusNanos(long nanosToAdd)
返回一份本即时来指定持续时间增加。
|
Instant |
Instant.plusSeconds(long secondsToAdd)
返回此即时的副本,以指定的持续时间在秒添加。
|
Instant |
OffsetDateTime.toInstant()
将这一
Instant 日期时间。
|
Instant |
Instant.truncatedTo(TemporalUnit unit)
返回一份本
Instant 截断到指定单位。
|
Instant |
Instant.with(TemporalAdjuster adjuster)
返回此即时的调整后的副本。
|
Instant |
Instant.with(TemporalField field, long newValue)
将此即时的副本与指定的字段设置为一个新值。
|
Modifier and Type | Method and Description |
---|---|
int |
Instant.compareTo(Instant otherInstant)
将这一瞬间与指定的即时进行比较。
|
static Clock |
Clock.fixed(Instant fixedInstant, ZoneId zone)
获得总是返回同一时刻的时钟。
|
boolean |
Instant.isAfter(Instant otherInstant)
检查如果这一瞬间是在指定的即时。
|
boolean |
Instant.isBefore(Instant otherInstant)
检查如果这一瞬间是在指定的即时。
|
static OffsetTime |
OffsetTime.ofInstant(Instant instant, ZoneId zone)
获得
OffsetTime 实例从一个
Instant 和区域ID。
|
static OffsetDateTime |
OffsetDateTime.ofInstant(Instant instant, ZoneId zone)
获得
OffsetDateTime 实例从一个
Instant 和区域ID。
|
static LocalDateTime |
LocalDateTime.ofInstant(Instant instant, ZoneId zone)
获得
LocalDateTime 实例从一个
Instant 和区域ID。
|
static ZonedDateTime |
ZonedDateTime.ofInstant(Instant instant, ZoneId zone)
获得
ZonedDateTime 实例从一个
Instant 。
|
Modifier and Type | Method and Description |
---|---|
default Instant |
ChronoZonedDateTime.toInstant()
将这一
Instant 日期时间。
|
default Instant |
ChronoLocalDateTime.toInstant(ZoneOffset offset)
将这一
Instant 日期时间。
|
Modifier and Type | Method and Description |
---|---|
ZonedDateTime |
IsoChronology.zonedDateTime(Instant instant, ZoneId zone)
获得ISO划从
Instant 本年表日期时间。
|
default ChronoZonedDateTime<? extends ChronoLocalDate> |
Chronology.zonedDateTime(Instant instant, ZoneId zone)
从一个
Instant 这一
ChronoZonedDateTime 年表。
|
ChronoZonedDateTime<ThaiBuddhistDate> |
ThaiBuddhistChronology.zonedDateTime(Instant instant, ZoneId zone) |
ChronoZonedDateTime<JapaneseDate> |
JapaneseChronology.zonedDateTime(Instant instant, ZoneId zone) |
ChronoZonedDateTime<MinguoDate> |
MinguoChronology.zonedDateTime(Instant instant, ZoneId zone) |
ChronoZonedDateTime<HijrahDate> |
HijrahChronology.zonedDateTime(Instant instant, ZoneId zone) |
Modifier and Type | Method and Description |
---|---|
Instant |
ZoneOffsetTransition.getInstant()
获取过渡瞬间。
|
Modifier and Type | Method and Description |
---|---|
Duration |
ZoneRules.getDaylightSavings(Instant instant)
获取在该区域中指定的即时使用的日光节约量。
|
ZoneOffset |
ZoneRules.getOffset(Instant instant)
获取在这些规则中指定的即时应用的偏移量。
|
ZoneOffset |
ZoneRules.getStandardOffset(Instant instant)
获取此区域中指定的即时的标准偏移量。
|
boolean |
ZoneRules.isDaylightSavings(Instant instant)
检查指定的瞬间是否在日光节约中。
|
ZoneOffsetTransition |
ZoneRules.nextTransition(Instant instant)
获取指定的即时后的下一个过渡。
|
ZoneOffsetTransition |
ZoneRules.previousTransition(Instant instant)
获取指定的即时之前的前一个过渡。
|
Modifier and Type | Method and Description |
---|---|
Instant |
Calendar.toInstant()
将这个对象的一个
Instant 。
|
Instant |
Date.toInstant()
将这一
Instant
Date 对象。
|
Modifier and Type | Method and Description |
---|---|
static Date |
Date.from(Instant instant)
获得
Date 实例从一个
Instant 对象。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.