R
Roedy Green
IT would be nice if there were an easy way to have both valueOf and
toString aliases for enums.
Why?
To allow you to use reserved words like true, false, default, null as
your enum string constants.
to allow additional variants on input e.g. for "yes" also allow "true"
"t" "f".
To change the way the enum displays e.g. to change the language. to
change default/usual to whatever the default value actually is.
Any ideas on how to implement that cleanly?
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
toString aliases for enums.
Why?
To allow you to use reserved words like true, false, default, null as
your enum string constants.
to allow additional variants on input e.g. for "yes" also allow "true"
"t" "f".
To change the way the enum displays e.g. to change the language. to
change default/usual to whatever the default value actually is.
Any ideas on how to implement that cleanly?
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes