クラス
java.time.Instantの使用
-
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データを使用するためのクラスが含まれています。 -
-
java.langでのInstantの使用
型Instantの引数を持つ型を返すjava.langのメソッド 修飾子と型 メソッド 説明 Optional<Instant>ProcessHandle.Info. startInstant()プロセスの開始時間を返します。 -
java.nio.file.attributeでのInstantの使用
Instantを返すjava.nio.file.attributeのメソッド 修飾子と型 メソッド 説明 InstantFileTime. toInstant()このFileTimeオブジェクトをInstantに変換します。Instant型のパラメータを持つjava.nio.file.attributeのメソッド 修飾子と型 メソッド 説明 static FileTimeFileTime. from(Instant instant)時系列上で、指定されたInstantオブジェクトと同じ時点の値を表すFileTimeを返します。 -
java.sqlでのInstantの使用
Instantを返すjava.sqlのメソッド 修飾子と型 メソッド 説明 InstantDate. toInstant()このメソッドは常にUnsupportedOperationExceptionをスローします。SQLDate値は時間コンポーネントを持たないので、このメソッドは使わないでください。InstantTime. toInstant()このメソッドは常にUnsupportedOperationExceptionをスローします。SQLTime値は日付コンポーネントを持たないので、このメソッドは使わないでください。InstantTimestamp. toInstant()このTimestampオブジェクトをInstantに変換します。Instant型のパラメータを持つjava.sqlのメソッド 修飾子と型 メソッド 説明 static TimestampTimestamp. from(Instant instant)InstantオブジェクトからTimestampのインスタンスを取得します。 -
java.timeでのInstantの使用
Instantとして宣言されているjava.timeのフィールド 修飾子と型 フィールド 説明 static InstantInstant. EPOCH1970-01-01T00:00:00Zエポック・インスタントの定数。static InstantInstant. MAXサポートされる最大Instant、1000000000-12-31T23:59:59.999999999Z。static InstantInstant. MINサポートされる最小Instant、-1000000000-01-01T00:00Z。Instantを返すjava.timeのメソッド 修飾子と型 メソッド 説明 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)Instantのインスタンスをエポック1970-01-01T00:00:00Zからのミリ秒数を使用して取得します。static InstantInstant. ofEpochSecond(long epochSecond)Instantのインスタンスをエポック1970-01-01T00:00:00Zからの秒数を使用して取得します。static InstantInstant. ofEpochSecond(long epochSecond, long nanoAdjustment)Instantのインスタンスをエポック1970-01-01T00:00:00Zからの秒数と秒のナノ秒部分を使用して取得します。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)指定されたフィールドを新しい値に設定して、このインスタントのコピーを返します。Instant型のパラメータを持つjava.timeのメソッド 修飾子と型 メソッド 説明 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のインスタンスを取得します。 -
java.time.chronoでのInstantの使用
Instantを返すjava.time.chronoのメソッド 修飾子と型 メソッド 説明 default InstantChronoLocalDateTime. toInstant(ZoneOffset offset)この日付/時間をInstantに変換します。default InstantChronoZonedDateTime. toInstant()この日付/時間をInstantに変換します。Instant型のパラメータを持つjava.time.chronoのメソッド 修飾子と型 メソッド 説明 default ChronoZonedDateTime<? extends ChronoLocalDate>Chronology. zonedDateTime(Instant instant, ZoneId zone)Instantからこの暦でChronoZonedDateTimeを取得します。ZonedDateTimeIsoChronology. zonedDateTime(Instant instant, ZoneId zone)Instantからこの暦でISOのゾーン付きの日付/時間を取得します。 -
java.time.zoneでのInstantの使用
Instantを返すjava.time.zoneのメソッド 修飾子と型 メソッド 説明 InstantZoneOffsetTransition. getInstant()遷移インスタントを取得します。Instant型のパラメータを持つjava.time.zoneのメソッド 修飾子と型 メソッド 説明 DurationZoneRules. getDaylightSavings(Instant instant)このゾーンの指定されたインスタントに使用しているサマー・タイムの量を取得します。ZoneOffsetZoneRules. getOffset(Instant instant)これらのルールで、指定されたインスタントに適用できるオフセットを取得します。ZoneOffsetZoneRules. getStandardOffset(Instant instant)このゾーンでの指定されたインスタントの標準オフセットを取得します。booleanZoneRules. isDaylightSavings(Instant instant)指定されたインスタントがサマー・タイムにあるかどうかを確認します。ZoneOffsetTransitionZoneRules. nextTransition(Instant instant)指定されたインスタント後の次の遷移を取得します。ZoneOffsetTransitionZoneRules. previousTransition(Instant instant)指定されたインスタント前の前の遷移を取得します。 -
java.utilでのInstantの使用
Instantを返すjava.utilのメソッド 修飾子と型 メソッド 説明 InstantCalendar. toInstant()このオブジェクトをInstantに変換します。InstantDate. toInstant()このDateオブジェクトをInstantに変換します。Instant型のパラメータを持つjava.utilのメソッド 修飾子と型 メソッド 説明 static DateDate. from(Instant instant)InstantオブジェクトからDateのインスタンスを取得します。 -
java.util.loggingでのInstantの使用
Instantを戻すjava.util.loggingのメソッド 修飾子と型 メソッド 説明 InstantLogRecord. getInstant()イベントが発生した瞬間を取得します。型Instantのパラメータを持つjava.util.loggingのメソッド 修飾子と型 メソッド 説明 voidLogRecord. setInstant(Instant instant)イベントが発生した瞬間を設定します。 -
jdk.jfrでのInstantの使用
Instantを戻すjdk.jfrのメソッド 修飾子と型 メソッド 説明 InstantRecording. getStartTime()このレコーディングが開始された時間を返します。InstantRecording. getStopTime()このレコーディングが停止した時間を返します。型Instantのパラメータを持つjdk.jfrのメソッド 修飾子と型 メソッド 説明 InputStreamRecording. getStream(Instant start, Instant end)指定された間隔のデータ・ストリームを作成します。 -
jdk.jfr.consumerでのInstantの使用
Instantを戻すjdk.jfr.consumerのメソッド 修飾子と型 メソッド 説明 InstantRecordedEvent. getEndTime()イベントの終了時間を返します。InstantRecordedObject. getInstant(String name)タイムスタンプ・フィールドの値を返します。InstantRecordedEvent. getStartTime()イベントの開始時間を返します。
-