Package com.treescrub.spedran.data
Enum UserRole
- java.lang.Object
-
- java.lang.Enum<UserRole>
-
- com.treescrub.spedran.data.UserRole
-
- All Implemented Interfaces:
Serializable,Comparable<UserRole>
public enum UserRole extends Enum<UserRole>
The role of a user on SRC.
These roles are site wide, they are not affiliated with a specific leaderboard.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADMINSRC site admin.BANNEDThe user is currently banned, either temporarily or permanently.MODERATORSRC site moderator.PROGRAMMERSRC site programmer.TRUSTEDUnknown, unsure if actually used.USERThe default role for a normal user.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UserRolevalueOf(String name)Returns the enum constant of this type with the specified name.static UserRole[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
USER
public static final UserRole USER
The default role for a normal user.
-
BANNED
public static final UserRole BANNED
The user is currently banned, either temporarily or permanently.
-
TRUSTED
public static final UserRole TRUSTED
Unknown, unsure if actually used.
-
MODERATOR
public static final UserRole MODERATOR
SRC site moderator.
-
ADMIN
public static final UserRole ADMIN
SRC site admin.
-
PROGRAMMER
public static final UserRole PROGRAMMER
SRC site programmer.
-
-
Method Detail
-
values
public static UserRole[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UserRole c : UserRole.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UserRole valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-