Enum UserStatus

    • Enum Constant Detail

      • ONLINE

        public static final UserStatus ONLINE
        The user is online.
      • IDLE

        public static final UserStatus IDLE
        The user is idle.
      • DO_NOT_DISTURB

        public static final UserStatus DO_NOT_DISTURB
        The user is dnd.
      • INVISIBLE

        public static final UserStatus INVISIBLE
        The user is invisible. You cannot tell if a user is offline or invisible! This is only used to change your own status, but you will never see an other user marked as invisible.
      • OFFLINE

        public static final UserStatus OFFLINE
        Ths user is offline.
    • Method Detail

      • values

        public static UserStatus[] 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 (UserStatus c : UserStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UserStatus 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 name
        NullPointerException - if the argument is null
      • getStatusString

        public String getStatusString​()
        Gets the status string of the status.
        Returns:
        The status string of the status.
      • fromString

        public static UserStatus fromString​(String str)
        Gets the status from the given string.
        Parameters:
        str - The string, e.g. "online".
        Returns:
        The status or OFFLINE if unknown string.