O
Olli Plough
Hi,
am a bit annoyed because enums since JDK1.5 apparently cannot inherit
from other enums. Problem is I have to plaster code like
public enum MyEnum
{
private final String value;
Role(String value)
{
this.value = value;
}
public String value()
{
return value;
}
}
repeatedly into my application. Would be nice if the repetitive code
could be factored out into some abstract class. Am I getting something
wrong here or do I have to live with this?
Regards, Oliver Plohmann
am a bit annoyed because enums since JDK1.5 apparently cannot inherit
from other enums. Problem is I have to plaster code like
public enum MyEnum
{
private final String value;
Role(String value)
{
this.value = value;
}
public String value()
{
return value;
}
}
repeatedly into my application. Would be nice if the repetitive code
could be factored out into some abstract class. Am I getting something
wrong here or do I have to live with this?
Regards, Oliver Plohmann