A container for a Structure's data. Is normally contained within an ArrayStructure, which is an Array of StructureData. This is the abstract supertype for all implementations.
for (Iterator iter = sdata.getMembers().iterator(); iter.hasNext(); ) { StructureMembers.Member m = (StructureMembers.Member) iter.next(); Array sdataArray = sdata.getArray(m); ... }
General ways to access data in an StructureData are:
Array getArray(Member m)
Array getArray(String memberName)
The following will return an object of type Byte, Char, Double, Float, Int, Long, Short, String, or Structure, depending upon the member type:
Object getScalarObject( Member m)
A number of convenience routines may be able to avoid extra Object creation, and so are recommended for efficiency. These require that you know the data types of the member data, but they are the most efficent:
getScalarXXX(int recnum, Member m) getJavaArrayXXX(int recnum, Member m)
where XXX is Byte, Char, Double, Float, Int, Long, Short, or String. For members that are themselves Structures, the equivilent is:
StructureData getScalarStructure(int recnum, Member m) ArrayStructure getArrayStructure(int recnum, Member m)
These will return any compatible type as a double or float, but may have extra overhead when the types dont match:
convertScalarXXX(int recnum, Member m) convertJavaArrayXXX(int recnum, Member m)
where XXX is Double or Float
@author caron
@see ArrayStructure