I already created Enum. But i cannot create new Enum. I wanna create and compare 2 Enums actually. The X value is coming from backend. It's a dynamic value. I wanna make this;
EmployeeType type = new EmployeeType("X")
if (type == EmployeeType.X_PERSONALS) {
Log.i("SAMPLE_TAG", "Yesss!")
}
public enum EmployeeType {
X_PERSONALS("X"),
Y_PERSONALS("Y"),
Z_PERSONALS("Z");
private final String text;
EmployeeType(final String text) {
this.text = text;
}
public String getText() {
return text;
}
}