Enum ActivityType

    • Enum Constant Detail

      • PLAYING

        public static final ActivityType PLAYING
        Represents a normal activity, represented as "Playing Half-Life 3" for example.
      • STREAMING

        public static final ActivityType STREAMING
        Represents streaming a activity, represented as "Streaming Half-Life 3" for example.
      • LISTENING

        public static final ActivityType LISTENING
        Represents listening to an application, represented as "Listening to Half-Life 3" for example.
      • WATCHING

        public static final ActivityType WATCHING
        Represents watching an application, represented as "Watching Half-Life 3", for example.
    • Method Detail

      • values

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

        public static ActivityType 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
      • getId

        public int getId​()
        Gets the id of the activity type.
        Returns:
        The id of the activity type.
      • getActivityTypeById

        public static ActivityType getActivityTypeById​(int id)
        Gets the activity type by its id.
        Parameters:
        id - The id of the activity type
        Returns:
        The activity type with the given id or PLAYING if unknown id.