Share via


ITemporalAdjuster.AdjustInto(ITemporal) Method

Definition

Adjusts the specified temporal object.

[Android.Runtime.Register("adjustInto", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;", "GetAdjustInto_Ljava_time_temporal_Temporal_Handler:Java.Time.Temporal.ITemporalAdjusterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Time.Temporal.ITemporal? 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.Temporal.ITemporalAdjusterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal

Parameters

temporal
ITemporal

the temporal object to adjust, not null

Returns

an object of the same observable type with the adjustment made, not null

Attributes

Remarks

Adjusts the specified temporal object.

This adjusts the specified temporal object using the logic encapsulated in the implementing class. Examples might be an adjuster that sets the date avoiding weekends, or one that sets the date to the last day of the month.

There are two equivalent ways of using this method. The first is to invoke this method directly. The second is to use Temporal#with(TemporalAdjuster):

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

It is recommended to use the second approach, with(TemporalAdjuster), as it is a lot clearer to read in code.

Java documentation for java.time.temporal.TemporalAdjuster.adjustInto(java.time.temporal.Temporal).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to