Package org.javacord.api.entity.channel
Enum ChannelType
- java.lang.Object
-
- java.lang.Enum<ChannelType>
-
- org.javacord.api.entity.channel.ChannelType
-
- All Implemented Interfaces:
Serializable,Comparable<ChannelType>
public enum ChannelType extends Enum<ChannelType>
A enum with all different channel types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHANNEL_CATEGORYGROUP_CHANNELPRIVATE_CHANNELSERVER_TEXT_CHANNELSERVER_VOICE_CHANNELUNKNOWN
-
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 ChannelTypevalueOf(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
-
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(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 nameNullPointerException- if the argument is null
-
getId
public int getId()
Gets the id of the channel type.- Returns:
- The id of the channel type.
-
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.
-
-