public interface DataTypes
An instance can be obtained by calling
Diffusion.dataTypes()
.
Modifier and Type | Field and Description |
---|---|
static String |
BINARY_DATATYPE_NAME
Binary data type name.
|
static String |
DOUBLE_DATATYPE_NAME
Double data type name.
|
static String |
INT64_DATATYPE_NAME
INT64 data type name.
|
static String |
JSON_DATATYPE_NAME
JSON data type name.
|
static String |
RECORD_V2_DATATYPE_NAME
RecordV2 data type name.
|
static String |
STRING_DATATYPE_NAME
String data type name.
|
Modifier and Type | Method and Description |
---|---|
BinaryDataType |
binary()
Data type that supports arbitrary binary data.
|
DataType<Double> |
doubleFloat()
Data type that supports double-precision floating point numbers.
|
<V> DataType<V> |
getByClass(Class<V> valueClass)
Obtain a
DataType implementation by class. |
DataType<?> |
getByName(String typeName)
Obtain a
DataType implementation by type name. |
DataType<Long> |
int64()
Data type that supports 64-bit, signed integer values.
|
JSONDataType |
json()
JSON is "JavaScript Object Notation", a lightweight data-interchange
format.
|
RecordV2DataType |
recordV2()
Data type that supports data in the form of records and fields.
|
DataType<String> |
string()
Data type that supports string values.
|
void |
validateValueClass(Class<?> valueClass)
Check if a given
valueClass is a valid DataType
or a superclass of one. |
static final String BINARY_DATATYPE_NAME
getByName(String)
,
binary()
,
Constant Field Valuesstatic final String DOUBLE_DATATYPE_NAME
getByName(String)
,
doubleFloat()
,
Constant Field Valuesstatic final String INT64_DATATYPE_NAME
getByName(String)
,
int64()
,
Constant Field Valuesstatic final String JSON_DATATYPE_NAME
getByName(String)
,
json()
,
Constant Field Valuesstatic final String STRING_DATATYPE_NAME
getByName(String)
,
string()
,
Constant Field Valuesstatic final String RECORD_V2_DATATYPE_NAME
getByName(String)
,
recordV2()
,
Constant Field ValuesJSONDataType json()
BinaryDataType binary()
RecordV2DataType recordV2()
DataType<Double> doubleFloat()
The integer value is serialized as CBOR-format binary. A serialized value
can be read as
a JSON
instance.
The data type does not support binary deltas.
The data type supports null Double instances.
DataType<Long> int64()
The integer value is serialized as CBOR-format binary. A serialized value
can be read as
a JSON
instance.
The data type does not support binary deltas.
The data type supports null Long instances.
DataType<String> string()
The string value is serialized as CBOR-format binary. A serialized value
can be read as
a JSON
instance.
The data type supports binary deltas.
The data type supports null String instances.
DataType<?> getByName(String typeName)
DataType
implementation by type name.typeName
- the name, as returned by DataType.getTypeName()
IllegalArgumentException
- if there is no data type with the
name typeName
void validateValueClass(Class<?> valueClass)
valueClass
is a valid DataType
or a superclass of one.valueClass
- the classIllegalArgumentException
- if there is no data type that supports
values of class valueClass
.<V> DataType<V> getByClass(Class<V> valueClass)
DataType
implementation by class.valueClass
- the classIllegalArgumentException
- if there is no data type that supports
values of class valueClass
IllegalArgumentException
- if there is more than one data type that
supports values of the given class, but none is preferredCopyright © 2024 DiffusionData Ltd. All Rights Reserved.