|
The Enum package provides additional support for strongly typed enumerations. The package requires you to create a subclass of Enum, which then allows you to use the EnumUtils class to interrogate the Enum implementation. Unfortunately, to implement an Enum, several supporting methods must be included. Although a classic C-style enum is a useful pattern, in practice it's hard to imagine using this Enum package. If you are able to use Java 2 5.0 (also known as JDK 1.5), you can use the built-in enum support as described at http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html. |
|