Package net.dv8tion.jda.api.utils.data
Enum DataType
- All Implemented Interfaces:
Serializable
,Comparable<DataType>
Enum constants representing possible types for a
DataObject
value.-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataType
Assumes the type of the provided value through instance checks.boolean
Tests whether the type for the provided value is the one represented by this enum constant.static DataType
Returns the enum constant of this type with the specified name.static DataType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INT
-
FLOAT
-
STRING
-
OBJECT
-
ARRAY
-
BOOLEAN
-
NULL
-
UNKNOWN
-
-
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
-
getType
Assumes the type of the provided value through instance checks.- Parameters:
value
- The value to test- Returns:
- The DataType constant or
UNKNOWN
-
isType
Tests whether the type for the provided value is the one represented by this enum constant.- Parameters:
value
- The value to check- Returns:
- True, if the value is of this type
-