Package org.javacord.api.entity.activity
Enum ActivityType
- java.lang.Object
-
- java.lang.Enum<ActivityType>
-
- org.javacord.api.entity.activity.ActivityType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ActivityType>
public enum ActivityType extends java.lang.Enum<ActivityType>
Represents an activity type.- See Also:
- Discord docs
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPETINGRepresents competing in something, represented as "Competing in Half-Life 3", for example.CUSTOMRepresents a custom status, represented as "{emoji} {state}".LISTENINGRepresents listening to an application, represented as "Listening to Half-Life 3" for example.PLAYINGRepresents a normal activity, represented as "Playing Half-Life 3" for example.STREAMINGRepresents streaming an activity, represented as "Streaming Half-Life 3" for example.WATCHINGRepresents watching an application, represented as "Watching Half-Life 3", for example.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ActivityTypegetActivityTypeById(int id)Gets the activity type by its id.intgetId()Gets the id of the activity type.static ActivityTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ActivityType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 an 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.
-
CUSTOM
public static final ActivityType CUSTOM
Represents a custom status, represented as "{emoji} {state}".
-
COMPETING
public static final ActivityType COMPETING
Represents competing in something, represented as "Competing in 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(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 namejava.lang.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
PLAYINGif unknown id.
-
-