public static AbnormalState getStateById(int id) { for (AbnormalState as : values()) { if (as.getId() == id) return as; } return null; }