Enum Class AccessLevel

java.lang.Object
java.lang.Enum<AccessLevel>
com.avrix.enums.AccessLevel
All Implemented Interfaces:
Serializable, Comparable<AccessLevel>, Constable

public enum AccessLevel extends Enum<AccessLevel>
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 Constants
    Enum Constant
    Description
    Highest 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 Type
    Method
    Description
    Converts a string to the corresponding AccessLevel.
    int
    Returns the priority of a given access level.
    Returns the name of this access level.
    Returns the enum constant of this class with the specified name.
    static AccessLevel[]
    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

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ADMIN

      public static final AccessLevel ADMIN
      Highest access level, typically reserved for administrators. This level has the highest priority.
    • MODERATOR

      public static final AccessLevel MODERATOR
      Access level for moderators, who manage user interactions and content. Priority is lower than ADMIN but higher than OVERSEER.
    • OVERSEER

      public static final AccessLevel OVERSEER
      Access level for overseers, who have oversight capabilities, but fewer privileges than moderators.
    • GM

      public static final AccessLevel GM
      Access level for game masters or GMs, who manage game-specific elements. Priority is above OBSERVER but below OVERSEER.
    • OBSERVER

      public static final AccessLevel OBSERVER
      Observer access level, typically for users with limited privileges, mainly to view or monitor without broader administrative rights.
    • NONE

      public static final AccessLevel NONE
      The default access level representing no special privileges. This is the lowest priority level.
  • Method Details

    • values

      public static AccessLevel[] 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

      public static AccessLevel valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getPriority

      public int getPriority()
      Returns the priority of a given access level.
      Returns:
      access level priority
    • getRoleName

      public String getRoleName()
      Returns the name of this access level.
      Returns:
      access level name
    • fromString

      public static AccessLevel fromString(String text)
      Converts a string to the corresponding AccessLevel. Returns NONE if no match is found.
      Parameters:
      text - the string to convert
      Returns:
      the corresponding AccessLevel