SubjectiveStatus.java 540 B

1234567891011121314151617181920212223242526
  1. package cn.com.qmth.markingaudit.enums;
  2. public enum SubjectiveStatus {
  3. UNMARK("未评完"), MARKED("已评完");
  4. private String name;
  5. private SubjectiveStatus(String name) {
  6. this.name = name;
  7. }
  8. public String getName() {
  9. return name;
  10. }
  11. public static SubjectiveStatus findByText(String text) {
  12. for (SubjectiveStatus c : SubjectiveStatus.values()) {
  13. if (c.toString().equalsIgnoreCase(text)) {
  14. return c;
  15. }
  16. }
  17. return null;
  18. }
  19. }