enum of enums - possible?

Hendrik Schreiber <hs-doAduxQln/dWk0Htik3J/[email protected]>
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <[email protected]>
Hi,

I have been toying around with Java 5 features recently and bumped  
into the following question:

Is it possible to have an enum of enums?

Let's say I have some localized resource. So, my outer enum is made  
up of locale ids (US, DE, etc.) my inner enum of actual resources. In  
essence I would like to be able to get to my resource like this:

RESOURCES.US.SOME_RESOURCE

Where RESOURCE is the outer enum, US is an element of the outer enum,  
but at the same time the inner enum and SOME_RESOURCE is one element  
of the inner enum.

I tried to get some code to work, but suspect it is not possible by  
exclusively using the enum construct. Or is it?

Thanks,

-hendrik

tagtraum industries incorporated
1412 Glenwood Ave 1B
Raleigh, NC 27605
USA
+1 919 637 1661
http://www.tagtraum.com/

_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.