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

public static enum MessageEmbed.MessageEmbedFlag extends Enum<MessageEmbed.MessageEmbedFlag>
Known embed flags.
  • Enum Constant Details

  • Method Details

    • values

      public static MessageEmbed.MessageEmbedFlag[] 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

      public static MessageEmbed.MessageEmbedFlag 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 name
      NullPointerException - 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

      @Nonnull public static 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.
      Parameters:
      bitfield - Non-negative integer representing a bitfield of embed flags
      Returns:
      Set of embed flags found in the bitfield
    • toBitField

      public static int toBitField(@Nonnull Collection<MessageEmbed.MessageEmbedFlag> flags)
      Converts a collection of embed flags back to the integer representing the bitfield. This is the reverse operation of fromBitField(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 is null