 |
Compare Java enum values - Stack Overflow
All Java enums implements Comparable: http://java.sun.com/javase/6/docs/api/java/lang/Enum.html You can also use the ordinal method to turn them into ints, then comparison is trivial. if (ErrorLevel.ERROR.compareTo(someOtherLevel) ...
stackoverflow.com |
 |