Tech Per

05 Feb

Java5: From Ordinal Value To Enum Instance

The enum type introduced in Java5 is quite powerful, but I miss a factory method to get an enum instance from its ordinal value. The existing factory method in Enum.valueOf(Class, String) lets you get an enum instance from its type and name, but there is no valueOf which lets you get it from the ordinal [...]

© 2008 Tech Per | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo