クラス
java.time.Instantの使用
パッケージ
説明
Javaプログラミング言語の設計にあたり基本的なクラスを提供します。
ファイルおよびファイル・システム属性へのアクセスを提供するインタフェースとクラスです。
Javaプログラミング言語を使用して、データ・ソース(通常はリレーショナル・データベース)に格納されているデータにアクセスして処理するためのAPIを提供します。
日付、時間、インスタント、デュレーションのメインAPI。
デフォルトのISO暦以外の暦体系の汎用API。
タイムゾーンおよびそのルールのサポート。
コレクション・フレームワーク、国際化サポート・クラス、サービス・ローダー、プロパティ、乱数生成、文字列解析とスキャン・クラス、Base64エンコーディングとデコード、ビット配列、およびその他のユーティリティ・クラスが含まれています。
並行プログラミングでよく使用されるユーティリティ・クラスです。
Java 2プラットフォームのコア・ロギング機能のクラスおよびインタフェースを提供します。
このパッケージは、イベントを作成してFlight Recorderを制御するクラスを提供します。
このパッケージには、Flight Recorderデータを使用するためのクラスが含まれています。
このパッケージには、Java Management Extensions (JMX)のFlight Recorderを制御およびモニターするクラスが含まれています。
-
java.langでのInstantの使用
-
java.nio.file.attributeでのInstantの使用
-
java.sqlでのInstantの使用
-
java.timeでのInstantの使用
修飾子と型フィールド説明static final Instant
Instant.EPOCH
1970-01-01T00:00:00Zエポック・インスタントの定数。static final Instant
Instant.MAX
サポートされる最大Instant
、1000000000-12-31T23:59:59.999999999Z。static final Instant
Instant.MIN
サポートされる最小Instant
、-1000000000-01-01T00:00Z。修飾子と型メソッド説明static Instant
Instant.from
(TemporalAccessor temporal) Instant
のインスタンスを時間的オブジェクトから取得します。abstract Instant
Clock.instant()
クロックの現在の時点を取得します。InstantSource.instant()
ソースの現在のインスタントを取得します。Instant.minus
(long amountToSubtract, TemporalUnit unit) このインスタントのコピーから指定された量を引いたものを返します。Instant.minus
(TemporalAmount amountToSubtract) このインスタントのコピーから指定された量を引いたものを返します。Instant.minusMillis
(long millisToSubtract) このインスタントのコピーから指定されたミリ秒単位デュレーションを引いたものを返します。Instant.minusNanos
(long nanosToSubtract) このインスタントのコピーから指定されたナノ秒単位デュレーションを引いたものを返します。Instant.minusSeconds
(long secondsToSubtract) このインスタントのコピーから指定された秒単位デュレーションを引いたものを返します。static Instant
Instant.now()
システム・クロックから現在のインスタントを取得します。static Instant
指定されたクロックから現在のインスタントを取得します。static Instant
Instant.ofEpochMilli
(long epochMilli) Instant
のインスタンスをエポック1970-01-01T00:00:00Zからのミリ秒数を使用して取得します。static Instant
Instant.ofEpochSecond
(long epochSecond) Instant
のインスタンスをエポック1970-01-01T00:00:00Zからの秒数を使用して取得します。static Instant
Instant.ofEpochSecond
(long epochSecond, long nanoAdjustment) Instant
のインスタンスをエポック1970-01-01T00:00:00Zからの秒数と秒のナノ秒部分を使用して取得します。static Instant
Instant.parse
(CharSequence text) 2007-12-03T10:15:30.00Z
などのテキスト文字列からInstant
のインスタンスを取得します。Instant.plus
(long amountToAdd, TemporalUnit unit) 指定された量を加算した、このインスタントのコピーを返します。Instant.plus
(TemporalAmount amountToAdd) 指定された量を加算した、このインスタントのコピーを返します。Instant.plusMillis
(long millisToAdd) このインスタントのコピーに指定されたミリ秒単位デュレーションを加算したものを返します。Instant.plusNanos
(long nanosToAdd) このインスタントのコピーに指定されたナノ秒単位デュレーションを加算したものを返します。Instant.plusSeconds
(long secondsToAdd) このインスタントのコピーに指定された秒単位デュレーションを加算したものを返します。OffsetDateTime.toInstant()
この日付/時間をInstant
に変換します。Instant.truncatedTo
(TemporalUnit unit) 指定された単位に切り捨てられた状態で、このInstant
のコピーを返します。Instant.with
(TemporalAdjuster adjuster) このインスタントの調整済のコピーを返します。Instant.with
(TemporalField field, long newValue) 指定されたフィールドを新しい値に設定して、このインスタントのコピーを返します。修飾子と型メソッド説明int
このインスタントと指定されたインスタントを比較します。static Clock
常に同じインスタントを返すクロックを取得します。static InstantSource
常に同じインスタントを返すソースを取得します。boolean
このインスタントが指定されたインスタントの後かどうかをチェックします。boolean
このインスタントが指定されたインスタントの前かどうかをチェックします。static LocalDate
Instant
およびゾーンIDからLocalDate
のインスタンスを取得します。static LocalDateTime
Instant
およびゾーンIDからLocalDateTime
のインスタンスを取得します。static LocalTime
Instant
およびゾーンIDからLocalTime
のインスタンスを取得します。static OffsetDateTime
Instant
およびゾーンIDからOffsetDateTime
のインスタンスを取得します。static OffsetTime
Instant
およびゾーンIDからOffsetTime
のインスタンスを取得します。static ZonedDateTime
Instant
からZonedDateTime
のインスタンスを取得します。 -
java.time.chronoでのInstantの使用
修飾子と型メソッド説明default Instant
ChronoLocalDateTime.toInstant
(ZoneOffset offset) この日付/時間をInstant
に変換します。default Instant
ChronoZonedDateTime.toInstant()
この日付/時間をInstant
に変換します。修飾子と型メソッド説明default ChronoZonedDateTime
<? extends ChronoLocalDate> Chronology.zonedDateTime
(Instant instant, ZoneId zone) Instant
からこの暦でChronoZonedDateTime
を取得します。HijrahChronology.zonedDateTime
(Instant instant, ZoneId zone) IsoChronology.zonedDateTime
(Instant instant, ZoneId zone) Instant
からこの暦でISOのゾーン付きの日付/時間を取得します。JapaneseChronology.zonedDateTime
(Instant instant, ZoneId zone) MinguoChronology.zonedDateTime
(Instant instant, ZoneId zone) ThaiBuddhistChronology.zonedDateTime
(Instant instant, ZoneId zone) -
java.time.zoneでのInstantの使用
修飾子と型メソッド説明ZoneRules.getDaylightSavings
(Instant instant) このゾーンの指定されたインスタントに使用しているサマー・タイムの量を取得します。これらのルールで、指定されたインスタントに適用できるオフセットを取得します。ZoneRules.getStandardOffset
(Instant instant) このゾーンでの指定されたインスタントの標準オフセットを取得します。boolean
ZoneRules.isDaylightSavings
(Instant instant) 指定されたインスタントがサマー・タイムにあるかどうかを確認します。ZoneRules.nextTransition
(Instant instant) 指定されたインスタント後の次の遷移を取得します。ZoneRules.previousTransition
(Instant instant) 指定されたインスタント前の前の遷移を取得します。 -
java.utilでのInstantの使用
-
java.util.concurrentでのInstantの使用
修飾子と型メソッド説明このタスク・スコープで開始されたすべてのサブタスクが終了するまで、またはタスク・スコープが停止するまで、指定した期限まで待機します。このタスク・スコープで開始されたサブタスクが「successfully」PREVIEWに完了するまで、またはすべてのサブタスクが完了するまで、指定した期限まで待機します。 -
java.util.loggingでのInstantの使用
-
jdk.jfrでのInstantの使用
修飾子と型メソッド説明Recording.getStartTime()
このレコーディングが開始された時間を返します。Recording.getStopTime()
このレコーディングが停止した時間を返します。 -
jdk.jfr.consumerでのInstantの使用
修飾子と型メソッド説明RecordedEvent.getEndTime()
イベントの終了時間を返します。final Instant
RecordedObject.getInstant
(String name) タイムスタンプ・フィールドの値を返します。RecordedEvent.getStartTime()
イベントの開始時間を返します。修飾子と型メソッド説明void
EventStream.setEndTime
(Instant endTime) ストリームの終了時間を指定します。void
RecordingStream.setEndTime
(Instant endTime) void
EventStream.setStartTime
(Instant startTime) ストリームの開始時間を指定します。void
RecordingStream.setStartTime
(Instant startTime) -
jdk.management.jfrでのInstantの使用
修飾子と型メソッド説明void
RemoteRecordingStream.setEndTime
(Instant endTime) void
RemoteRecordingStream.setStartTime
(Instant startTime)