Enum(String name, int ordinal)
public final int ordinal():
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero). Most programmers will have no use for this method.
It is designed for use by sophisticated enum-based data structures, such as
EnumSet
and
EnumMap
.
.
public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name):
返回带指定名称的指定枚举类型的枚举常量。名称必须与在此类型中声明枚举常量所用的标识符完全匹配。
public static Enum[] values():
API中没有,用来返回EMU中所有的枚举类型数据的数组,用来遍历所有的枚举类型