Enum MessageEmbed.MessageEmbedFlag
java.lang.Object
java.lang.Enum<MessageEmbed.MessageEmbedFlag>
net.dv8tion.jda.api.entities.MessageEmbed.MessageEmbedFlag
- All Implemented Interfaces:
Serializable, Comparable<MessageEmbed.MessageEmbedFlag>
- Enclosing class:
MessageEmbed
Known embed flags.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSet<MessageEmbed.MessageEmbedFlag> fromBitField(int bitfield) Given a bitfield, this function extracts all enum values according to their bit values and returns a set containing all matching embed flags.intgetValue()Returns the value of the flag as represented in the bitfield.static intConverts a collection of embed flags back to the integer representing the bitfield.Returns the enum constant of this type with the specified name.static MessageEmbed.MessageEmbedFlag[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
IS_CONTENT_INVENTORY_ENTRY
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getValue
public int getValue()Returns the value of the flag as represented in the bitfield. It is always a power of 2. (single bit)- Returns:
- Non-zero bit value of the field
-
fromBitField
Given a bitfield, this function extracts all enum values according to their bit values and returns a set containing all matching embed flags.- Parameters:
bitfield- Non-negative integer representing a bitfield of embed flags- Returns:
- Set of embed flags found in the bitfield
-
toBitField
Converts a collection of embed flags back to the integer representing the bitfield. This is the reverse operation offromBitField(int).- Parameters:
flags- A non-null collection of embed flags- Returns:
- Integer value of the bitfield representing the given embed flags
- Throws:
IllegalArgumentException- If the provided collection isnull
-