public class HDF5CompoundType<T> extends HDF5DataType
IHDF5CompoundInformationRetriever
. The simplest way of creating a
compound type for a Java class, is
IHDF5CompoundInformationRetriever.getInferredType(Class)
.
Once you have a compound type, you may use methods like
IHDF5CompoundReader.read(String, HDF5CompoundType)
and
IHDF5CompoundWriter.write(String, HDF5CompoundType, Object)
and to read and write them.
Modifier and Type | Method and Description |
---|---|
void |
checkMappingComplete()
Checks whether the mapping between the on-disk representation and the in-memory
representation is complete.
|
HDF5CompoundMemberInformation[] |
getCompoundMemberInformation()
Returns an array with the
HDF5CompoundMemberInformation of all compound members. |
HDF5CompoundMemberInformation[] |
getCompoundMemberInformation(HDF5DataTypeInformation.DataTypeInfoOptions options)
Returns an array with the
HDF5CompoundMemberInformation of all compound members. |
java.lang.Class<T> |
getCompoundType()
Returns the Java type of the compound.
|
java.util.Map<java.lang.String,HDF5EnumerationType> |
getEnumTypeMap()
Returns the map of member names to enumeration types (only enum members will have an entry in
the map).
|
java.lang.String |
getMemberName(int idx)
Returns the name of compound member idx.
|
int |
getMemberOffsetInMemory(int idx)
Returns the memory offset (within the record) of compound member idx (in bytes).
|
int |
getMemberOffSetOnDisk(int idx)
Returns the disk offset (within the record) of compound member idx (in bytes).
|
int |
getMemberSize(int idx)
Returns the size of compound member idx (in bytes).
|
int |
getNumberOfMembers()
Returns the number of compound members.
|
int |
getRecordSizeInMemory()
Returns the size of the record in memory (in bytes).
|
int |
getRecordSizeOnDisk()
Returns the size of the record on disk (in bytes).
|
HDF5CompoundMemberInformation[] |
getUnmappedCompoundMemberInformation()
Returns an with the
HDF5CompoundMemberInformation of compound members that are not
mapped to the in-memory representation. |
java.lang.String[] |
getUnmappedCompoundMemberNames()
Returns an array with the names of compound members that are not mapped to the in-memory
representation.
|
java.lang.String[] |
getUnmappedFieldNames()
Returns an array with names of fields of the in-memory representation that do not map to any
compound member in the on-disk representation.
|
boolean |
isDiskRepresentationIncomplete()
Returns
true if there are fields in the in-memory representation that are not
mapped to any compound member in the on-disk representation. |
boolean |
isMappingIncomplete()
Returns
true , if the mapping between the in-memory and the on-disk
representation is incomplete, that is if either isDiskRepresentationIncomplete() or
isMemoryRepresentationIncomplete() returns true . |
boolean |
isMemoryRepresentationIncomplete()
Returns
true if there are compound members in the on-disk representation that
are not mapped to fields in the in-memory representation. |
boolean |
isRequireTypesToBeEqual()
Returns
true , if this type is expected to be equal to the type of a data set it
is used to read. |
java.lang.String |
toString() |
java.lang.String |
tryGetName()
Returns a name for this type, or
null if this type has no name. |
equals, getDataTypeInformation, getDataTypeInformation, getName, hashCode, tryGetDataTypePath
public java.lang.Class<T> getCompoundType()
public int getRecordSizeOnDisk()
public int getRecordSizeInMemory()
public int getNumberOfMembers()
public java.lang.String getMemberName(int idx)
public int getMemberSize(int idx)
public int getMemberOffSetOnDisk(int idx)
public int getMemberOffsetInMemory(int idx)
public HDF5CompoundMemberInformation[] getCompoundMemberInformation()
HDF5CompoundMemberInformation
of all compound members.public HDF5CompoundMemberInformation[] getCompoundMemberInformation(HDF5DataTypeInformation.DataTypeInfoOptions options)
HDF5CompoundMemberInformation
of all compound members.public boolean isMappingIncomplete()
true
, if the mapping between the in-memory and the on-disk
representation is incomplete, that is if either isDiskRepresentationIncomplete()
or
isMemoryRepresentationIncomplete()
returns true
.public boolean isMemoryRepresentationIncomplete()
true
if there are compound members in the on-disk representation that
are not mapped to fields in the in-memory representation.public boolean isRequireTypesToBeEqual()
true
, if this type is expected to be equal to the type of a data set it
is used to read.public java.lang.String[] getUnmappedCompoundMemberNames()
public HDF5CompoundMemberInformation[] getUnmappedCompoundMemberInformation()
HDF5CompoundMemberInformation
of compound members that are not
mapped to the in-memory representation. If no members are unmapped, an empty array is
returned.public boolean isDiskRepresentationIncomplete()
true
if there are fields in the in-memory representation that are not
mapped to any compound member in the on-disk representation.public void checkMappingComplete() throws HDF5JavaException
HDF5JavaException
- if isMappingIncomplete()
returns true
.public java.lang.String[] getUnmappedFieldNames()
public java.lang.String tryGetName()
HDF5DataType
null
if this type has no name.tryGetName
in class HDF5DataType
public java.util.Map<java.lang.String,HDF5EnumerationType> getEnumTypeMap()
public java.lang.String toString()
toString
in class java.lang.Object