> [CB] If you don't use fromString() or fromInt() etc, how do you correctly
> construct enumerations from their actual underlying value (the String,
> integer, etc) and verify the value is valid according to the enum?
>

I use enums read-only .. I never needed to have the underlying value
exposed to me, I just want constants of the same custom type

the most frequent situation where I use them is when I need to pass in
some kind of simple value but don't want to use int or String because I
want both type-safety and a tight restriction on the possible values of
the argument (my enums are always final too)

perhaps you use them in combination with some kind of persistence
framework ? I never did.

-- Wouter





-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to