In Java you could:
public enum Enum {
ONE {
public String method() {
return "1";
}
},
TWO {
public String method() {
return "2";
}
},
THREE {
public String method() {
return "3";
}
};
public abstract String method();
}
How do you do this in Scala?
EDIT / Useful links:
question from:https://stackoverflow.com/questions/4346580/how-to-add-a-method-to-enumeration-in-scala