Package net.dv8tion.jda.api.entities
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
Represents the type of this Entitlement
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entitlement.EntitlementType
fromKey
(int key) Gets the EntitlementType related to the provided key.int
getKey()
The Discord defined id key for this EntitlementType.static Entitlement.EntitlementType
Returns the enum constant of this type with the specified name.static Entitlement.EntitlementType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
APPLICATION_SUBSCRIPTION
-
UNKNOWN
Placeholder for unsupported types.
-
-
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
-
getKey
public int getKey()The Discord defined id key for this EntitlementType.- Returns:
- the id key.
-
fromKey
Gets the EntitlementType related to the provided key.
If an unknown key is provided, this returnsUNKNOWN
- Parameters:
key
- The Discord key referencing a EntitlementType.- Returns:
- The EntitlementType that has the key provided, or
UNKNOWN
for unknown key.
-