Advertisement
Guest User

Untitled

a guest
Jan 17th, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public enum AppointmentStatus {
  2. SCHEDULED("Scheduled"), RESCHEDULED("Rescheduled"), WALKIN("Walk-In"), CANCELLED("Cancelled"), WAITING("Waiting"), INCONSULTATION(
  3. "In-Consultation"), COMPLETED("Completed"), MISSED("Missed");
  4.  
  5. private final String text;
  6.  
  7. private AppointmentStatus(final String text) {
  8. this.text = text;
  9. }
  10.  
  11. public static AppointmentStatus getEnum(String value) {
  12. for (AppointmentStatus v : values())
  13. if (v.toString().equalsIgnoreCase(value))
  14. return v;
  15. return null;
  16. }
  17.  
  18. @Override
  19. public String toString() {
  20. return text;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement