次の方法で共有


TemporalAdjusters.OfDateAdjuster(IUnaryOperator) Method

Definition

Obtains a TemporalAdjuster that wraps a date adjuster.

[Android.Runtime.Register("ofDateAdjuster", "(Ljava/util/function/UnaryOperator;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)]
public static Java.Time.Temporal.ITemporalAdjuster? OfDateAdjuster (Java.Util.Functions.IUnaryOperator? dateBasedAdjuster);
[<Android.Runtime.Register("ofDateAdjuster", "(Ljava/util/function/UnaryOperator;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)>]
static member OfDateAdjuster : Java.Util.Functions.IUnaryOperator -> Java.Time.Temporal.ITemporalAdjuster

Parameters

dateBasedAdjuster
IUnaryOperator

the date-based adjuster, not null

Returns

the temporal adjuster wrapping on the date adjuster, not null

Attributes

Remarks

Obtains a TemporalAdjuster that wraps a date adjuster.

The TemporalAdjuster is based on the low level Temporal interface. This method allows an adjustment from LocalDate to LocalDate to be wrapped to match the temporal-based interface. This is provided for convenience to make user-written adjusters simpler.

In general, user-written adjusters should be static constants:

{@code
             static TemporalAdjuster TWO_DAYS_LATER =
                  TemporalAdjusters.ofDateAdjuster(date -> date.plusDays(2));
            }

Java documentation for java.time.temporal.TemporalAdjusters.ofDateAdjuster(java.util.function.UnaryOperator<java.time.LocalDate>).

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