From: "Gary Gregory" <[EMAIL PROTECTED]> > I am using the Enum class and nearly created a similar class to the > ValuedEnum class already in the package. My application types for enums are > ints, longs, Strings, and internet addresses. Is there any thought to having > a more generic java.lang.Object valued enum class instead of just one > specifically typed to ints and therefore oddly named "Value" instead of > "IntValue"?
[cc to Jakarta Commons User List] ValuedEnum is primariliy designed to allow Enums to be used in switch statements. (As well as defining the static final constant of the ValuedEnum, you also define a static final constant of the integer value, so it can be used in a switch statement) The Enum class is not designed to carry additional data as you describe. What you describe may be more suited to defining your own subclasses of Enum, one for holding a long and one for internet addresses. Stephen -- To unsubscribe, e-mail: <mailto:commons-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-user-help@;jakarta.apache.org>
