commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Möller <>
Subject Proposal for new commons subproject "Enum"
Date Tue, 11 Jan 2005 15:34:38 GMT

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?

Thorsten Möller 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message