Package smile.data.type
Class DataTypes
java.lang.Object
smile.data.type.DataTypes
To get a specific data type, users should use singleton objects
and factory methods in this class.
-
Field Summary
Modifier and TypeFieldDescriptionstatic ArrayType
Boolean Array data type.static ObjectType
Boolean Object data type.static BooleanType
Boolean data type.static ArrayType
Byte Array data type.static ObjectType
Byte Object data type.static ByteType
Byte data type.static ArrayType
Char Array data type.static ObjectType
Char Object data type.static CharType
Char data type.static DateTimeType
DateTime data type with ISO format.static DateType
Date data type with ISO format.static DecimalType
Decimal data type.static ArrayType
Double Array data type.static ObjectType
Double Object data type.static DoubleType
Double data type.static ArrayType
Float Array data type.static ObjectType
Float Object data type.static FloatType
Float data type.static ArrayType
Integer Array data type.static ObjectType
Integer Object data type.static IntegerType
Integer data type.static ArrayType
Long Array data type.static ObjectType
Long Object data type.static LongType
Long data type.static ObjectType
Plain Object data type.static ArrayType
Short Array data type.static ObjectType
Short Object data type.static ShortType
Short data type.static StringType
String data type.static TimeType
Time data type with ISO format. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayType
Creates an array data type.static DateType
Date data type with customized format.static DateTimeType
DateTime data type with customized format.static DataType
Creates an object data type of a given class.static StructType
Creates a struct data type from JDBC result set meta data.static StructType
struct
(ResultSetMetaData meta, String dbms) Creates a struct data type from JDBC result set meta data.static StructType
struct
(List<StructField> fields) Creates a struct data type.static StructType
struct
(StructField... fields) Creates a struct data type.static TimeType
Time data type with customized format.
-
Field Details
-
BooleanType
Boolean data type. -
CharType
Char data type. -
ByteType
Byte data type. -
ShortType
Short data type. -
IntegerType
Integer data type. -
LongType
Long data type. -
FloatType
Float data type. -
DoubleType
Double data type. -
DecimalType
Decimal data type. -
StringType
String data type. -
DateType
Date data type with ISO format. -
DateTimeType
DateTime data type with ISO format. -
TimeType
Time data type with ISO format. -
ObjectType
Plain Object data type. -
BooleanObjectType
Boolean Object data type. -
CharObjectType
Char Object data type. -
ByteObjectType
Byte Object data type. -
ShortObjectType
Short Object data type. -
IntegerObjectType
Integer Object data type. -
LongObjectType
Long Object data type. -
FloatObjectType
Float Object data type. -
DoubleObjectType
Double Object data type. -
BooleanArrayType
Boolean Array data type. -
CharArrayType
Char Array data type. -
ByteArrayType
Byte Array data type. -
ShortArrayType
Short Array data type. -
IntegerArrayType
Integer Array data type. -
LongArrayType
Long Array data type. -
FloatArrayType
Float Array data type. -
DoubleArrayType
Double Array data type.
-
-
Constructor Details
-
DataTypes
public DataTypes()
-
-
Method Details
-
date
Date data type with customized format.- Parameters:
pattern
- the date regex pattern.- Returns:
- the Date type.
-
time
Time data type with customized format.- Parameters:
pattern
- the time regex pattern.- Returns:
- the Time type.
-
datetime
DateTime data type with customized format.- Parameters:
pattern
- the date time regex pattern.- Returns:
- the DateTime type.
-
object
Creates an object data type of a given class.- Parameters:
clazz
- the object class.- Returns:
- the object data type.
-
array
Creates an array data type.- Parameters:
type
- the data type of array elements.- Returns:
- the array data type.
-
struct
Creates a struct data type.- Parameters:
fields
- the struct fields.- Returns:
- the struct data type.
-
struct
Creates a struct data type.- Parameters:
fields
- the struct fields.- Returns:
- the struct data type.
-
struct
Creates a struct data type from JDBC result set meta data.- Parameters:
rs
- the JDBC result set.- Returns:
- the struct data type.
- Throws:
SQLException
- when JDBC operation fails.
-
struct
Creates a struct data type from JDBC result set meta data.- Parameters:
meta
- the JDBC result set meta data.dbms
- the name of database management system.- Returns:
- the struct data type.
- Throws:
SQLException
- when JDBC operation fails.
-