I stumbled over the following problem that i can\'t extend and implement from this class which is defined in Java 1.5 (java.lang package)
public abstract cla
Enum gets special treatment by the compiler and classes like EnumSet make assumptions based on this treatment. The behavior of Enum methods like ordinal()
and name()
is strictly defined and implementing them yourself to replicate this behavior makes no sense. Also the syntax to declare enum values is only valid in an enum
and wont compile in a class
.
It is important to remember that you should never use ordinal()
yourself, so defining it to suit your problem makes no sense.