Re: nested enum
- From: Roedy Green <look-on@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 09:21:47 GMT
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.
.
- References:
- nested enum
- From: a
- nested enum
- Prev by Date: Re: Problem with compiling files in a folder
- Next by Date: Re: Good books for a complete beginner!
- Previous by thread: nested enum
- Next by thread: Re: nested enum
- Index(es):
Relevant Pages
|