Re: nested enum



On Tue, 30 Aug 2005 07:14:24 GMT, "a" <a@xxxxxxxx> wrote or quoted :

> For example,
> private enum inside0{a,b,c}
> private enum inside1{d,e,f}
> private enum outside{inside0, inside1}
>
> outside _variable=outside.inside0.a; //error here, but want a similar
>way
>
> Is it possible to set the _variable in the way similar to the above?
> Thanx
>

enums are final. They are designed to be totally independent of any
other enum.

What you might do is something similar with nested classes to what
enum does, but in a way that lets you do what you want. I suggest
looking an decompilations of enum code.


See http://mindprod.com/jgloss/enum.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.



Relevant Pages