Language

OffsetTime.AdjustInto(ITemporal) Method

Definition

Adjusts the specified temporal object to have the same offset and time as this object.

[Android.Runtime.Register("adjustInto", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;", "", 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;", "", ApiSince=26)>]
abstract member AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal
override this.AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal

Parameters

temporal
ITemporal

the target object to be adjusted, not null

Returns

the adjusted object, not null

Implements

Attributes

Remarks

Adjusts the specified temporal object to have the same offset and time as this object. This returns a temporal object of the same observable type as the input with the offset and time changed to be the same as this. The adjustment is equivalent to using Temporal.with(TemporalField, long) twice, passing ChronoField.NANO_OF_DAY and ChronoField.OFFSET_SECONDS as the fields. In most cases, it is clearer to reverse the calling pattern by using Temporal.with(TemporalAdjuster):

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

This instance is immutable and unaffected by this method call.

Java reference for java.time.OffsetTime.adjustInto.

Applies to