public enum HijrahEra extends Enum<HijrahEra> implements Era
Hijrah日历系统只有一个时代覆盖了大于0的幼年时光。
请勿使用ordinal()获取HijrahEra的数字HijrahEra 。 改用getValue() 。
| Enum Constant and Description |
|---|
AH
当代时代的单身实例“Anno Hegirae”,其数值为1。
|
| Modifier and Type | Method and Description |
|---|---|
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, valueOfadjustInto, get, getDisplayName, getLong, isSupported, querypublic 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 - 如果参数为空
public static HijrahEra of(int hijrahEra)
int获取HijrahEra一个实例。
目前唯一被接受的时代,它的价值是1
hijrahEra - 代表的时代,只有1支持
DateTimeException - 如果值无效
public ValueRange range(TemporalField field)
范围对象表示字段的最小和最大有效值。 这个时代用来提高返回范围的准确性。 如果不可能返回范围,因为该字段不受支持或出于某种其他原因,则抛出异常。
如果该字段是ChronoField,那么查询是在这里实现的。 ERA字段返回范围。 所有其他ChronoField实例将抛出一个UnsupportedTemporalTypeException 。
如果字段不是ChronoField ,则通过调用TemporalField.rangeRefinedBy(TemporalAccessor)通过this作为参数获得该方法的结果。 是否可以获得范围由字段确定。
ERA字段返回一个有效的Hijrah时代的范围。
range在界面
Era
range在接口
TemporalAccessor
field - 查询范围的字段,不为null
DateTimeException - 如果无法获取字段的范围
UnsupportedTemporalTypeException - 如果不支持本机
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.