Re: Enums vs static final Strings
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Aug 2007 11:43:19 GMT
On Wed, 22 Aug 2007 11:39:03 +0100, RedGrittyBrick
<redgrittybrick@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted
someone who said :
if (ButtonName.OTHER.toString().equals(command))
Try the valueOf method that converts a String to an enum.
once you have the enum, you have access to all the values declared in
the Enum constant definition, plus all the enum methods, plus all the
enum methods specific to that enum.
See http://mindprod.com/jgloss/enum.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.
- Follow-Ups:
- Re: Enums vs static final Strings
- From: RedGrittyBrick
- Re: Enums vs static final Strings
- References:
- Enums vs static final Strings
- From: RedGrittyBrick
- Enums vs static final Strings
- Prev by Date: Re: Eclipse plugin : Browser View query
- Next by Date: How to compile a java source with UTF-8 encoding in cmd?
- Previous by thread: Enums vs static final Strings
- Next by thread: Re: Enums vs static final Strings
- Index(es):