public final class HDF5DataTypeInformation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HDF5DataTypeInformation.DataTypeInfoOptions
An object that represents the options for a data type information object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
HDF5DataClass |
getDataClass()
Returns the data class (
INTEGER , FLOAT , ...) of this type. |
int[] |
getDimensions()
Returns the dimensions along each axis of this type (an empty array for a scalar type).
|
int |
getElementSize()
Returns the size of one element (in bytes) of this type.
|
int |
getElementSizeForPadding()
The element size as is relevant for padding to ensure memory alignment.
|
int |
getNumberOfElements()
Returns the number of elements of this type.
|
int |
getRank()
Returns the rank (number of dimensions) of this type (0 for a scalar type).
|
HDF5DataClass |
getRawDataClass()
Returns the raw data class (
INTEGER , FLOAT , ...) of this type. |
int |
getSize()
Returns the total size (in bytes) of this data set.
|
int |
getUsableLength()
The length that is usable.
|
int |
hashCode() |
boolean |
isArrayType()
Returns
true if this type is an HDF5 array type. |
boolean |
isBitField()
Returns
true , if the data set is a bitfield type. |
boolean |
isEnum()
Returns
true , if the data set is an enumeration type. |
boolean |
isSigned()
Returns
true , if this data set type has a sign anf false otherwise. |
boolean |
isTimeDuration()
Returns
true , if the data set is a time duration, or false
otherwise. |
boolean |
isTimeStamp()
Returns
true , if the data set is a time stamp, or false otherwise. |
boolean |
isVariableLengthString()
Returns
true , if this data set type is a variable-length string, or
false otherwise. |
boolean |
isVariableLengthType()
Deprecated.
Use
isVariableLengthString() instead. |
boolean |
knowsDataTypePath()
Returns whether the data type path has been determined.
|
boolean |
knowsDataTypeVariant()
Returns whether the data type variant has been determined.
|
static HDF5DataTypeInformation.DataTypeInfoOptions |
options()
Returns a new
HDF5DataTypeInformation.DataTypeInfoOptions object. |
java.lang.String |
toString() |
java.lang.String |
tryGetDataTypePath()
If this is a committed (named) data type and
knowsDataTypePath() ==
true , return the path of the data type. |
java.lang.Class<?> |
tryGetJavaType()
Returns an appropriate Java type, or
null , if this HDF5 type has no appropriate
Java type. |
java.lang.String |
tryGetName()
Returns the name of this datatype, if it is a committed data type.
|
java.lang.String |
tryGetOpaqueTag()
Returns the tag of an opaque data type, or
null , if this data type is not
opaque. |
HDF5TimeUnit |
tryGetTimeUnit()
Returns the time unit of the data set, if the data set is a time duration, or
null otherwise. |
HDF5DataTypeVariant |
tryGetTypeVariant()
Returns the
HDF5DataTypeVariant , or null , if this type has no variant or
knowsDataTypeVariant() == false . |
public static HDF5DataTypeInformation.DataTypeInfoOptions options()
HDF5DataTypeInformation.DataTypeInfoOptions
object.public HDF5DataClass getRawDataClass()
INTEGER
, FLOAT
, ...) of this type.
May differ from getDataClass()
if it is the type of a scaled enum (
HDF5DataTypeVariant.ENUM
or a scaled bitfield (@link
HDF5DataTypeVariant.BITFIELD
.
public HDF5DataClass getDataClass()
INTEGER
, FLOAT
, ...) of this type.public int getElementSize()
public int getUsableLength()
getElementSize()
, except for Strings,
where it takes into account the character encoding.public int getElementSizeForPadding()
public int getNumberOfElements()
This will be 1 except for array data types.
public int getSize()
public int getRank()
public int[] getDimensions()
public boolean isArrayType()
true
if this type is an HDF5 array type.@Deprecated public boolean isVariableLengthType()
isVariableLengthString()
instead.true
if this type is an HDF5 VL (variable-length) type.public boolean isSigned()
true
, if this data set type has a sign anf false
otherwise.public boolean isVariableLengthString()
true
, if this data set type is a variable-length string, or
false
otherwise.public java.lang.String tryGetOpaqueTag()
null
, if this data type is not
opaque.public boolean knowsDataTypePath()
A return value of true
does not necessarily mean that
tryGetDataTypePath()
will return a value other than null
, but a return
value of false
means that this method will always return null
.
public java.lang.String tryGetDataTypePath()
knowsDataTypePath()
==
true
, return the path of the data type. Otherwise null
is returned.public java.lang.String tryGetName()
public boolean knowsDataTypeVariant()
A return value of true
does not necessarily mean that
tryGetTypeVariant()
will return a value other than null
, but a return
value of false
means that this method will always return null
.
public HDF5DataTypeVariant tryGetTypeVariant()
HDF5DataTypeVariant
, or null
, if this type has no variant or
knowsDataTypeVariant()
== false
.public boolean isTimeStamp()
true
, if the data set is a time stamp, or false
otherwise.public boolean isTimeDuration()
true
, if the data set is a time duration, or false
otherwise.public HDF5TimeUnit tryGetTimeUnit()
null
otherwise.public boolean isEnum()
true
, if the data set is an enumeration type.public boolean isBitField()
true
, if the data set is a bitfield type.public java.lang.Class<?> tryGetJavaType()
null
, if this HDF5 type has no appropriate
Java type.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object