Enum Entitlement.EntitlementType

java.lang.Object
java.lang.Enum<Entitlement.EntitlementType>
net.dv8tion.jda.api.entities.Entitlement.EntitlementType
All Implemented Interfaces:
Serializable, Comparable<Entitlement.EntitlementType>
Enclosing interface:
Entitlement

public static enum Entitlement.EntitlementType extends Enum<Entitlement.EntitlementType>
Represents the type of this Entitlement
  • Enum Constant Details

  • Method Details

    • values

      public static Entitlement.EntitlementType[] 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 Entitlement.EntitlementType 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
    • getKey

      public int getKey()
      The Discord defined id key for this EntitlementType.
      Returns:
      the id key.
    • fromKey

      @Nonnull public static Entitlement.EntitlementType fromKey(int key)
      Gets the EntitlementType related to the provided key.
      If an unknown key is provided, this returns UNKNOWN
      Parameters:
      key - The Discord key referencing a EntitlementType.
      Returns:
      The EntitlementType that has the key provided, or UNKNOWN for unknown key.