More with Java enums: simulating inheritance- July 9, 2007 One drawback to the Java enum is the lack of inheritance. Java uses inheritance for many reasons, one of which is implementation inheritance. (In C++ you would use private inheritance for the same reason.) To recapture implementation inheritance with enums, use the visitor pattern: class Convert public interface Vivid char character(); public static <E extends Enum<E> & Vivid> E from( E values, char character) for (E e : values) .http://binkley.blogspot.com/2007/07/more-with-java-enums-simulating.html |