Enum ResolvedMedia.ResolvedMediaFlag
java.lang.Object
java.lang.Enum<ResolvedMedia.ResolvedMediaFlag>
net.dv8tion.jda.api.components.ResolvedMedia.ResolvedMediaFlag
- All Implemented Interfaces:
Serializable, Comparable<ResolvedMedia.ResolvedMediaFlag>
- Enclosing interface:
ResolvedMedia
Known 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 media flags.intgetValue()Returns the value of the flag as represented in the bitfield.static intConverts a collection of media flags back to the integer representing the bitfield.Returns the enum constant of this type with the specified name.static ResolvedMedia.ResolvedMediaFlag[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
IS_ANIMATED
This image 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 media flags.- Parameters:
bitfield- Non-negative integer representing a bitfield of media flags- Returns:
- Set of media flags found in the bitfield
-
toBitField
Converts a collection of media flags back to the integer representing the bitfield. This is the reverse operation offromBitField(int).- Parameters:
flags- A non-null collection of media flags- Returns:
- Integer value of the bitfield representing the given media flags
- Throws:
IllegalArgumentException- If the provided collection isnull
-