Package org.javacord.api.entity.message
Enum MessageDecoration
- java.lang.Object
-
- java.lang.Enum<MessageDecoration>
-
- org.javacord.api.entity.message.MessageDecoration
-
- All Implemented Interfaces:
Serializable
,Comparable<MessageDecoration>
public enum MessageDecoration extends Enum<MessageDecoration>
All basic decorations available in discord.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPrefix()
Gets the prefix of the decoration.String
getSuffix()
Gets the suffix of the decoration.static MessageDecoration
valueOf(String name)
Returns the enum constant of this type with the specified name.static MessageDecoration[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ITALICS
public static final MessageDecoration ITALICS
-
BOLD
public static final MessageDecoration BOLD
-
STRIKEOUT
public static final MessageDecoration STRIKEOUT
-
CODE_SIMPLE
public static final MessageDecoration CODE_SIMPLE
-
CODE_LONG
public static final MessageDecoration CODE_LONG
-
UNDERLINE
public static final MessageDecoration UNDERLINE
-
SPOILER
public static final MessageDecoration SPOILER
-
-
Method Detail
-
values
public static MessageDecoration[] 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 (MessageDecoration c : MessageDecoration.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageDecoration 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
-
getPrefix
public String getPrefix()
Gets the prefix of the decoration.- Returns:
- The prefix of the decoration.
-
getSuffix
public String getSuffix()
Gets the suffix of the decoration.- Returns:
- The suffix of the decoration.
-
-