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 final ArrayType
Boolean Array data type.static final ObjectType
Boolean Object data type.static final BooleanType
Boolean data type.static final ArrayType
Byte Array data type.static final ObjectType
Byte Object data type.static final ByteType
Byte data type.static final ArrayType
Char Array data type.static final ObjectType
Char Object data type.static final CharType
Char data type.static final DateTimeType
DateTime data type with ISO format.static final DateType
Date data type with ISO format.static final DecimalType
Decimal data type.static final ArrayType
Double Array data type.static final ObjectType
Double Object data type.static final DoubleType
Double data type.static final ArrayType
Float Array data type.static final ObjectType
Float Object data type.static final FloatType
Float data type.static final ArrayType
Integer Array data type.static final ObjectType
Integer Object data type.static final IntegerType
Integer data type.static final ArrayType
Long Array data type.static final ObjectType
Long Object data type.static final LongType
Long data type.static final ObjectType
Plain Object data type.static final ArrayType
Short Array data type.static final ObjectType
Short Object data type.static final ShortType
Short data type.static final StringType
String data type.static final 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 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 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.
-