Heh... teach me to jump back and forth across multiple JVM versions and
programming languages. I completely forgot about the fact that in a
switch with enums, you're only supposed to include the label... e.g.,
switch(type) {
case XHTML:
case HTML:
case TEXT:
}
Now I'm feeling quite silly......
- James
Stephen Duncan wrote:
> Is there a reason you can't just switch on the enum itself? (A
> retroweaver limitation?)
>
> - Stephen
>
> On 7/17/06, James M Snell <[EMAIL PROTECTED]> wrote:
>> e.g.,
>>
>> switch(entry.getContentType().ordinal()) {
>> case Content.TYPE_TEXT:
>> ...
>> case Content.TYPE_HTML:
>> ...
>> case Content.TYPE_XHTML:
>> ...
>> }
>>
>> Garrett Rooney wrote:
>> > On 7/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> >> Author: jmsnell
>> >> Date: Mon Jul 17 17:15:41 2006
>> >> New Revision: 422926
>> >>
>> >> URL: http://svn.apache.org/viewvc?rev=422926&view=rev
>> >> Log:
>> >> It's a mystery to me why enum does not automatically expose the
>> >> ordinal value for it's members
>> >
>> > Uhh, I kinda wonder too, but just out of curiosity what are you
>> > actually using these values for?
>> >
>> > -garrett
>> >
>>
>
>