Package icu.easyj.core.enums
Enum Class DataType
- All Implemented Interfaces:
Serializable,Comparable<DataType>,Constable
数据类型(目前就一些常用的数据类型,可以根据需要再添加一些)
- Author:
- wangliang181230
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DataTypegetByClass(Class<?> clazz) 根据数据类获取枚举static DataTypegetByCode(int code) 根据代码获取枚举static DataType根据类型字符串获取枚举Class<?>getClazz()intgetCode()org.springframework.core.convert.TypeDescriptorbooleanstatic DataTypeReturns the enum constant of this class with the specified name.static DataType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
-
CHAR_PRIMITIVE
-
CHARACTER
-
SHORT_PRIMITIVE
-
SHORT
-
INT_PRIMITIVE
-
INTEGER
-
LONG_PRIMITIVE
-
LONG
-
BIG_INTEGER
-
FLOAT_PRIMITIVE
-
FLOAT
-
DOUBLE_PRIMITIVE
-
DOUBLE
-
BIG_DECIMAL
-
BOOLEAN_PRIMITIVE
-
BOOLEAN
-
BYTE_PRIMITIVE
-
BYTE
-
DATE
-
DURATION
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode() -
getClazz
-
getTypeDesc
public org.springframework.core.convert.TypeDescriptor getTypeDesc() -
isPrimitive
public boolean isPrimitive() -
getByCode
根据代码获取枚举- Parameters:
code- 代码- Returns:
- 枚举
-
getByType
根据类型字符串获取枚举- Parameters:
type- 类型字符串- Returns:
- 枚举
-
getByClass
根据数据类获取枚举- Parameters:
clazz- 数据类- Returns:
- 枚举
-