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