JDK for Solaris Developer's Guide

Typesafe Enums

This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern (Effective Java, Item 21) without the verbosity and the error-proneness. Refer to JSR 201 and to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html.