Easiest way to get Enum in to Key Value pair.
- by vijay.shad
Hi,
I have defined my Enums like this.
public enum UserType {
RESELLER("Reseller"),
SERVICE_MANAGER("Manager"),
HOST("Host");
private String name;
private UserType(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
What should be the easiest way to get a key-value pair form the enum values?