言語

YearMonth.WithYear(Int32) メソッド

定義

年が変更されたこの YearMonth のコピーを返します。

[Android.Runtime.Register("withYear", "(I)Ljava/time/YearMonth;", "", ApiSince=26)]
public Java.Time.YearMonth? WithYear(int year);
[<Android.Runtime.Register("withYear", "(I)Ljava/time/YearMonth;", "", ApiSince=26)>]
member this.WithYear : int -> Java.Time.YearMonth

パラメーター

year
Int32

MIN_YEARからMAX_YEARに、返された年の月に設定する年

返品

要求された年で、null ではなく、今年の月に基づく YearMonth

属性

注釈

年が変更されたこの YearMonth のコピーを返します。 このインスタンスは不変であり、このメソッド呼び出しの影響を受けません。

Javaリファレンス。

適用対象