Package org.javacord.api.entity.channel
Enum ChannelType
- java.lang.Object
-
- java.lang.Enum<ChannelType>
-
- org.javacord.api.entity.channel.ChannelType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ChannelType>
public enum ChannelType extends java.lang.Enum<ChannelType>
An enum with all different channel types.
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChannelTypefromId(int id)Gets a channel type by its id.intgetId()Gets the id of the channel type.static ChannelType[]getRegularServerChannelTypes()Gets an array with all types that are regular server channel types.static ChannelType[]getServerChannelTypes()Gets an array with all types that are server channel types.static ChannelType[]getTextChannelTypes()Gets an array with all types that are text channel types.static ChannelType[]getVoiceChannelTypes()Gets an array with all type that are voice channel types.booleanisRegularServerChannelType()Checks if this type is a regular server channel type.booleanisServerChannelType()Checks if this type is a server channel type.booleanisTextChannelType()Checks if this type is a text channel type.booleanisVoiceChannelType()Checks if this type is a voice channel type.static ChannelTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ChannelType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SERVER_TEXT_CHANNEL
public static final ChannelType SERVER_TEXT_CHANNEL
-
PRIVATE_CHANNEL
public static final ChannelType PRIVATE_CHANNEL
-
SERVER_VOICE_CHANNEL
public static final ChannelType SERVER_VOICE_CHANNEL
-
GROUP_CHANNEL
public static final ChannelType GROUP_CHANNEL
-
CHANNEL_CATEGORY
public static final ChannelType CHANNEL_CATEGORY
-
SERVER_NEWS_CHANNEL
public static final ChannelType SERVER_NEWS_CHANNEL
-
SERVER_STORE_CHANNEL
public static final ChannelType SERVER_STORE_CHANNEL
-
SERVER_NEWS_THREAD
public static final ChannelType SERVER_NEWS_THREAD
-
SERVER_PUBLIC_THREAD
public static final ChannelType SERVER_PUBLIC_THREAD
-
SERVER_PRIVATE_THREAD
public static final ChannelType SERVER_PRIVATE_THREAD
-
SERVER_STAGE_VOICE_CHANNEL
public static final ChannelType SERVER_STAGE_VOICE_CHANNEL
-
SERVER_DIRECTORY_CHANNEL
public static final ChannelType SERVER_DIRECTORY_CHANNEL
-
SERVER_FORUM_CHANNEL
public static final ChannelType SERVER_FORUM_CHANNEL
-
UNKNOWN
public static final ChannelType UNKNOWN
-
-
Method Detail
-
values
public static ChannelType[] 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 (ChannelType c : ChannelType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChannelType 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 channel type.- Returns:
- The id of the channel type.
-
isTextChannelType
public boolean isTextChannelType()
Checks if this type is a text channel type.- Returns:
- Whether this type is a text channel type or not.
-
isVoiceChannelType
public boolean isVoiceChannelType()
Checks if this type is a voice channel type.- Returns:
- Whether this type is a voice channel type or not.
-
isServerChannelType
public boolean isServerChannelType()
Checks if this type is a server channel type.- Returns:
- Whether this type is a server channel type or not.
-
isRegularServerChannelType
public boolean isRegularServerChannelType()
Checks if this type is a regular server channel type.- Returns:
- Whether this type is a server channel type or not.
-
fromId
public static ChannelType fromId(int id)
Gets a channel type by its id.- Parameters:
id- The id of the channel type.- Returns:
- The channel type with the given id.
-
getTextChannelTypes
public static ChannelType[] getTextChannelTypes()
Gets an array with all types that are text channel types.- Returns:
- All types that are text channel types.
-
getVoiceChannelTypes
public static ChannelType[] getVoiceChannelTypes()
Gets an array with all type that are voice channel types.- Returns:
- All types that are voice channel types.
-
getServerChannelTypes
public static ChannelType[] getServerChannelTypes()
Gets an array with all types that are server channel types.- Returns:
- All types that are server channel types.
-
getRegularServerChannelTypes
public static ChannelType[] getRegularServerChannelTypes()
Gets an array with all types that are regular server channel types.- Returns:
- All types that are server channel types.
-
-