Modifier and Type | Method and Description |
---|---|
static UserRoll |
convert(int id)
convert a int value to enum state
|
int |
getValue()
return the int value
|
static UserRoll |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static UserRoll[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UserRoll ADMIN
public static final UserRoll KV
public static final UserRoll DOCTOR
public static UserRoll[] values()
for (UserRoll c : UserRoll.values()) System.out.println(c);
public static UserRoll valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getValue()
public static UserRoll convert(int id)
id
- to convert