語言

IChronoLocalDate.ITemporalAdjuster.AdjustInto(ITemporal) 方法

定義

調整指定的時間物件,使其日期與此物件相同。

[Android.Runtime.Register("adjustInto", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;", "GetAdjustInto_Ljava_time_temporal_Temporal_Handler:Java.Time.Chrono.IChronoLocalDate, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
override sealed Java.Time.Temporal.ITemporal? ITemporalAdjuster.AdjustInto(Java.Time.Temporal.ITemporal? temporal);
[<Android.Runtime.Register("adjustInto", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;", "GetAdjustInto_Ljava_time_temporal_Temporal_Handler:Java.Time.Chrono.IChronoLocalDate, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Java.Time.Temporal.ITemporalAdjuster.AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal
override this.Java.Time.Temporal.ITemporalAdjuster.AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal

參數

temporal
ITemporal

要調整的目標物件,不是 null

傳回

調整後的物件,而非 null

實作

屬性

備註

調整指定的時間物件,使其日期與此物件相同。

此時回傳與輸入相同可觀察型態的時間物件,且日期與此物相同。

調整等同於將 Temporal#with(TemporalField, long) 傳球 ChronoField#EPOCH_DAY 作為場域。

在大多數情況下,更清晰的做法是用:Temporal#with(TemporalAdjuster)

// these two lines are equivalent, but the second approach is recommended
              temporal = thisLocalDate.adjustInto(temporal);
              temporal = temporal.with(thisLocalDate);

此實例是不可變且不受此方法呼叫影響的。

Java 文件 java.time.chrono.ChronoLocalDate.adjustInto(java.time.temporal.Temporal)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於