Package com.avrix.enums
Enum Class AccessLevel
- All Implemented Interfaces:
Serializable
,Comparable<AccessLevel>
,Constable
Enumerates various access levels with priorities for comparison.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionHighest access level, typically reserved for administrators.Access level for game masters or GMs, who manage game-specific elements.Access level for moderators, who manage user interactions and content.The default access level representing no special privileges.Observer access level, typically for users with limited privileges, mainly to view or monitor without broader administrative rights.Access level for overseers, who have oversight capabilities, but fewer privileges than moderators. -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessLevel
fromString
(String text) Converts a string to the corresponding AccessLevel.int
Returns the priority of a given access level.Returns the name of this access level.static AccessLevel
Returns the enum constant of this class with the specified name.static AccessLevel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ADMIN
Highest access level, typically reserved for administrators. This level has the highest priority. -
MODERATOR
Access level for moderators, who manage user interactions and content. Priority is lower than ADMIN but higher than OVERSEER. -
OVERSEER
Access level for overseers, who have oversight capabilities, but fewer privileges than moderators. -
GM
Access level for game masters or GMs, who manage game-specific elements. Priority is above OBSERVER but below OVERSEER. -
OBSERVER
Observer access level, typically for users with limited privileges, mainly to view or monitor without broader administrative rights. -
NONE
The default access level representing no special privileges. This is the lowest priority level.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getPriority
public int getPriority()Returns the priority of a given access level.- Returns:
- access level priority
-
getRoleName
Returns the name of this access level.- Returns:
- access level name
-
fromString
Converts a string to the corresponding AccessLevel. Returns NONE if no match is found.- Parameters:
text
- the string to convert- Returns:
- the corresponding AccessLevel
-