java.lang.enum

来源:互联网 发布:centos 6.5 ipv6 配置 编辑:程序博客网 时间:2024/06/06 06:51

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 asEnumSet andEnumMap.

.

public static <T extends Enum<T>> T valueOf(Class<T> enumType,String name):

返回带指定名称的指定枚举类型的枚举常量。名称必须与在此类型中声明枚举常量所用的标识符完全匹配。

 

 

public static Enum[] values():

API中没有,用来返回EMU中所有的枚举类型数据的数组,用来遍历所有的枚举类型