You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Thorsten Möller <Th...@umit.at> on 2005/01/11 16:34:38 UTC

Proposal for new commons subproject "Enum"

Hello,

First of all, this is a very very short informal proposal, just to get your 
opinion about it before starting any further efforts.

The last days suddenly I had an idea towards a new Commons subproject, which 
might be called "Enum". Ok, what is the point about "Enum". As you may know, 
one of the new powerful Java 5.0 language features are enumerated types. So 
far so good. I suppose some (or many) of you already got into situations 
realizing that one repeatedly writes equal constants (or enums nowadays) 
into code (of different projects) but feeling that one would rather reuse 
what was already written before. In my opinion, nobody thought about reusing 
enums so far. Thus, the purpose of "Enum" should be _a collection of 
repeatedly used enumerations_ categorised via packages, to be reused 
wherever wanted. Here are some examples:
- gender (female, male)
- direction (up, down, left, right)
- orientation (north, east, south, west)
- state (on, off)
- state (pause, suspend, stop, ...)
- operation (+, -, *,  /, ...)
- day, month (maybe nonsense because of constants in java.util.Calendar)
- elements (hydrogen, oxygen, ...)
..

I'm conviced that there are a plenty of other candidates to this list.

Furtermore, since enums are objects like any other object every enumeration 
should provide a method for example toString(Locale l) to get translated 
strings for every enum, i.e. the project should support - 
internationalisation. This could be implemented based on property files, a 
feature used all over.

What do you think about this idea?

Regards,
Thorsten Möller 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org