that is what i do now but this is not very efficient since it had to create enum object
from string all the time (i can add each enum constant to the named class but it can be
tedious when there are lots of enums)
public boolean isGood(final String value) {
| return status.equals(value);
| }
and this has to be added to each enum class (with Status.class updated to reflect the
actuall class)
public boolean equals(final String value) {
| if (value == null || value.length() == 0) {
| return false;
| }
| try {
| if (this == Enum.valueOf(Status.class, value)){
| return true;
| }
| } catch (final IllegalArgumentException iae) {
| return false;
| }
| return false;
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116893#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...