public enum HijrahEra extends Enum<HijrahEra> implements Era
ヒジュラ暦体系には0より大きい先発暦の年をカバーする紀元が1つしかありません。
HijrahEra
の数値表現を取得するために、ordinal()
を使用しないでください。かわりにgetValue()
を使用してください。
列挙型定数と説明 |
---|
AH
現在の紀元「Anno Hegirae」のシングルトン・インスタンスで、数値は1です。
|
修飾子と型 | メソッドと説明 |
---|---|
String |
getDisplayName(TextStyle style, Locale locale)
この紀元のテキスト表現を取得します。
|
int |
getValue()
数値の紀元の
int 値を取得します。 |
static HijrahEra |
of(int hijrahEra)
int 値からHijrahEra のインスタンスを取得します。 |
ValueRange |
range(TemporalField field)
指定されたフィールドの有効な値の範囲を取得します。
|
static HijrahEra |
valueOf(String name)
指定された名前を持つ、この型の列挙型定数を返します。
|
static HijrahEra[] |
values()
この列挙型の定数を含む配列を、宣言されている順序で返します。
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
adjustInto, get, getLong, isSupported, query
public static final HijrahEra AH
public static HijrahEra[] values()
for (HijrahEra c : HijrahEra.values()) System.out.println(c);
public static HijrahEra valueOf(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- 指定された名前を持つ定数をこの列挙型が持っていない場合NullPointerException
- 引数がnullの場合public static HijrahEra of(int hijrahEra)
int
値からHijrahEra
のインスタンスを取得します。
現在の紀元、唯一受け付けられる値で、値は1
hijrahEra
- 表す紀元、1のみサポートDateTimeException
- 値が無効な場合public int getValue()
int
値を取得します。
紀元AHの値は1になります。
public ValueRange range(TemporalField field)
範囲オブジェクトはフィールドの有効な最小値と最大値を表します。この紀元は、返される範囲の精度を向上するために使われます。範囲を返せない場合は、フィールドがサポートされていないか他のなんらかの理由で、例外がスローされます。
フィールドがChronoField
の場合、ここに問合せを実装します。ERA
フィールドは範囲を返します。他のすべてのChronoField
インスタンスはUnsupportedTemporalTypeException
をスローします。
フィールドがChronoField
ではない場合、このメソッドの結果は、引数としてthis
を渡してTemporalField.rangeRefinedBy(TemporalAccessor)
を呼び出すことにより取得されます。範囲を取得できるかどうかはフィールドによって決まります。
ERA
フィールドは、1つの有効なヒジュラ暦の紀元の範囲を返します。
Era
のrange
TemporalAccessor
のrange
field
- 範囲を問い合わせるフィールド、null以外DateTimeException
- フィールドの範囲を取得できない場合UnsupportedTemporalTypeException
- 単位がサポートされていない場合public String getDisplayName(TextStyle style, Locale locale)
これは、紀元の識別に使用され、ユーザーへの表示に適したテキストの名前を返します。パラメータは返されるテキストとロケールのスタイルを制御します。
テキスト・マッピングが見つからない場合、数値
が返されます。
Era
のgetDisplayName
style
- 必要なテキストのスタイル、null以外locale
- 使用するロケール。null以外 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。