S
Sideswipe
So, I want the nicities of an enum, but I would like to extend the
enum list at runtime. is such a thing possible?
Example:
public enum Day {
MONDAY("Sucks");
private String comment;
Day(String comment) {this.comment = comment;}
}
// create a new Day enum Day.TUESDAY
// then
switch(day) {
case TUESDAY:
....
}
I am nearly certain it isn't possible, but I thought I would ask
anyways.
Christian Bongiorno
http://christian.bongiorno.org
enum list at runtime. is such a thing possible?
Example:
public enum Day {
MONDAY("Sucks");
private String comment;
Day(String comment) {this.comment = comment;}
}
// create a new Day enum Day.TUESDAY
// then
switch(day) {
case TUESDAY:
....
}
I am nearly certain it isn't possible, but I thought I would ask
anyways.
Christian Bongiorno
http://christian.bongiorno.org