Modifier and Type | Class and Description |
---|---|
static class |
DataType.Format
The general data type format categories.
|
Enum Constant and Description |
---|
BOOLEAN |
FLOAT16 |
FLOAT32 |
FLOAT64 |
INT32 |
INT64 |
INT8 |
STRING |
UINT8 |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
java.nio.Buffer |
asDataType(java.nio.ByteBuffer data)
Converts a
ByteBuffer to a buffer for this data type. |
static DataType |
fromBuffer(java.nio.Buffer data)
Returns the data type to use for a data buffer.
|
DataType.Format |
getFormat()
Returns the format of the data type.
|
int |
getNumOfBytes()
Returns the number of bytes for each element.
|
boolean |
isFloating()
Checks whether it is a floating data type.
|
boolean |
isInteger()
Checks whether it is an integer data type.
|
java.lang.String |
toString() |
static DataType |
valueOf(java.lang.String name)
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.
|
public static final DataType FLOAT32
public static final DataType FLOAT64
public static final DataType FLOAT16
public static final DataType UINT8
public static final DataType INT32
public static final DataType INT8
public static final DataType INT64
public static final DataType BOOLEAN
public static final DataType UNKNOWN
public static final DataType STRING
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getNumOfBytes()
public DataType.Format getFormat()
public boolean isFloating()
public boolean isInteger()
public static DataType fromBuffer(java.nio.Buffer data)
data
- the buffer to analyzepublic java.nio.Buffer asDataType(java.nio.ByteBuffer data)
ByteBuffer
to a buffer for this data type.data
- the buffer to convertpublic java.lang.String toString()
toString
in class java.lang.Enum<DataType>