Enum UserStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UserStatus>

    public enum UserStatus
    extends java.lang.Enum<UserStatus>
    An enum which contains all user status.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DO_NOT_DISTURB
      The user is dnd.
      IDLE
      The user is idle.
      INVISIBLE
      The user is invisible.
      OFFLINE
      Ths user is offline.
      ONLINE
      The user is online.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static UserStatus fromString​(java.lang.String str)
      Gets the status from the given string.
      java.lang.String getStatusString()
      Gets the status string of the status.
      static UserStatus valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static UserStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 another 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getStatusString

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

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