I have an enum as defined below. I need to convert it to a list of string which looks like ["In Progress","Cancelled","On Hold","Completed"]. How can I achieve that?
public static enum STATUS {
IN_PROGRESS("In Progress"),
CANCELLED("Cancelled"),
ON_HOLD("On Hold"),
COMPLETED("Completed");
private String value;
STATUS(String value) {
this.value = value;
}
public String getValue() {
return this.value;
}
}