Enum Class MessageEmbed.MessageEmbedMediaFlag
java.lang.Object
java.lang.Enum<MessageEmbed.MessageEmbedMediaFlag>
net.dv8tion.jda.api.entities.MessageEmbed.MessageEmbedMediaFlag
- All Implemented Interfaces:
Serializable, Comparable<MessageEmbed.MessageEmbedMediaFlag>, Constable
- Enclosing class:
MessageEmbed
public static enum MessageEmbed.MessageEmbedMediaFlag
extends Enum<MessageEmbed.MessageEmbedMediaFlag>
Known embed media flags.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
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 class with the specified name.static MessageEmbed.MessageEmbedMediaFlag[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
IS_ANIMATED
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
-