Package ucar.ma2
Class StructureDataA
- java.lang.Object
-
- ucar.ma2.StructureData
-
- ucar.ma2.StructureDataA
-
- Direct Known Subclasses:
StructureDataDeep
public class StructureDataA extends StructureData
A StructureData implementation delegates everything to the containing ArrayStructure.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
recno
protected ArrayStructure
sa
-
Fields inherited from class ucar.ma2.StructureData
EMPTY, members
-
-
Constructor Summary
Constructors Constructor Description StructureDataA(ArrayStructure sa, int recno)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
convertScalarDouble(StructureMembers.Member m)
Get scalar value as a double, with conversion as needed.float
convertScalarFloat(StructureMembers.Member m)
Get scalar value as a float, with conversion as needed.int
convertScalarInt(StructureMembers.Member m)
Get scalar value as a int, with conversion as needed.long
convertScalarLong(StructureMembers.Member m)
Get scalar value as a int, with conversion as needed.Array
getArray(StructureMembers.Member m)
Get member data array of any type as an Array.ArraySequence
getArraySequence(StructureMembers.Member m)
Get ArraySequence for a member of type Sequence.ArrayStructure
getArrayStructure(StructureMembers.Member m)
Get ArrayStructure for a member of type Structure.byte[]
getJavaArrayByte(StructureMembers.Member m)
Get member data of type byte array.char[]
getJavaArrayChar(StructureMembers.Member m)
Get member data of type char array.double[]
getJavaArrayDouble(StructureMembers.Member m)
Get java double array for a member of type double.float[]
getJavaArrayFloat(StructureMembers.Member m)
Get member data of type float array.int[]
getJavaArrayInt(StructureMembers.Member m)
Get member data of type int array.long[]
getJavaArrayLong(StructureMembers.Member m)
Get member data of type long array.short[]
getJavaArrayShort(StructureMembers.Member m)
Get member data of type short array.String[]
getJavaArrayString(StructureMembers.Member m)
Get java array of Strings for a member of type char or String.byte
getScalarByte(StructureMembers.Member m)
Get member data of type byte.char
getScalarChar(StructureMembers.Member m)
Get member data of type char.double
getScalarDouble(StructureMembers.Member m)
Get member data of type double.float
getScalarFloat(StructureMembers.Member m)
Get member data of type float.int
getScalarInt(StructureMembers.Member m)
Get member data of type int.long
getScalarLong(StructureMembers.Member m)
Get member data of type long.short
getScalarShort(StructureMembers.Member m)
Get member data of type short.String
getScalarString(StructureMembers.Member m)
Get member data of type String or 1D char.StructureData
getScalarStructure(StructureMembers.Member m)
Get member data of type Structure.void
showInternal(Formatter f, Indent indent)
-
Methods inherited from class ucar.ma2.StructureData
convertScalarDouble, convertScalarFloat, convertScalarInt, convertScalarLong, findMember, getArray, getArraySequence, getArrayStructure, getJavaArrayByte, getJavaArrayChar, getJavaArrayDouble, getJavaArrayFloat, getJavaArrayInt, getJavaArrayLong, getJavaArrayShort, getJavaArrayString, getMembers, getName, getScalarByte, getScalarChar, getScalarDouble, getScalarFloat, getScalarInt, getScalarLong, getScalarObject, getScalarObject, getScalarShort, getScalarString, getScalarStructure, getStructureMembers, showInternalMembers, toString
-
-
-
-
Field Detail
-
sa
protected ArrayStructure sa
-
recno
protected int recno
-
-
Constructor Detail
-
StructureDataA
public StructureDataA(ArrayStructure sa, int recno)
Constructor.- Parameters:
sa
- StructureData is always contained in a StructureArray.recno
- the recno in the StructureArray.
-
-
Method Detail
-
getArray
public Array getArray(StructureMembers.Member m)
Description copied from class:StructureData
Get member data array of any type as an Array.- Specified by:
getArray
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member.- Returns:
- Array values.
-
convertScalarInt
public int convertScalarInt(StructureMembers.Member m)
Description copied from class:StructureData
Get scalar value as a int, with conversion as needed. Underlying type must be convertible to int.- Specified by:
convertScalarInt
in classStructureData
- Parameters:
m
- member Variable.- Returns:
- scalar value as a int
-
convertScalarLong
public long convertScalarLong(StructureMembers.Member m)
Description copied from class:StructureData
Get scalar value as a int, with conversion as needed. Underlying type must be convertible to int.- Specified by:
convertScalarLong
in classStructureData
- Parameters:
m
- member Variable.- Returns:
- scalar value as a int
-
convertScalarFloat
public float convertScalarFloat(StructureMembers.Member m)
Description copied from class:StructureData
Get scalar value as a float, with conversion as needed. Underlying type must be convertible to float.- Specified by:
convertScalarFloat
in classStructureData
- Parameters:
m
- member Variable.- Returns:
- scalar value as a float
-
convertScalarDouble
public double convertScalarDouble(StructureMembers.Member m)
Description copied from class:StructureData
Get scalar value as a double, with conversion as needed. Underlying type must be convertible to double.- Specified by:
convertScalarDouble
in classStructureData
- Parameters:
m
- member Variable.- Returns:
- scalar value as a double
-
getScalarDouble
public double getScalarDouble(StructureMembers.Member m)
Description copied from class:StructureData
Get member data of type double.- Specified by:
getScalarDouble
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type double.- Returns:
- scalar double value
-
getJavaArrayDouble
public double[] getJavaArrayDouble(StructureMembers.Member m)
Description copied from class:StructureData
Get java double array for a member of type double.- Specified by:
getJavaArrayDouble
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type double.- Returns:
- 1D java array of doubles
-
getScalarFloat
public float getScalarFloat(StructureMembers.Member m)
Get member data of type float.- Specified by:
getScalarFloat
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type float.- Returns:
- scalar float value
-
getJavaArrayFloat
public float[] getJavaArrayFloat(StructureMembers.Member m)
Get member data of type float array.- Specified by:
getJavaArrayFloat
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type float.- Returns:
- 1D array of floats
-
getScalarByte
public byte getScalarByte(StructureMembers.Member m)
Get member data of type byte.- Specified by:
getScalarByte
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type byte.- Returns:
- scalar byte value
-
getJavaArrayByte
public byte[] getJavaArrayByte(StructureMembers.Member m)
Get member data of type byte array.- Specified by:
getJavaArrayByte
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type byte.- Returns:
- 1D array of bytes
-
getScalarShort
public short getScalarShort(StructureMembers.Member m)
Get member data of type short.- Specified by:
getScalarShort
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type short.- Returns:
- scalar short value
-
getJavaArrayShort
public short[] getJavaArrayShort(StructureMembers.Member m)
Get member data of type short array.- Specified by:
getJavaArrayShort
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type short.- Returns:
- 1D array of shorts
-
getScalarInt
public int getScalarInt(StructureMembers.Member m)
Get member data of type int.- Specified by:
getScalarInt
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type int.- Returns:
- scalar int value
-
getJavaArrayInt
public int[] getJavaArrayInt(StructureMembers.Member m)
Get member data of type int array.- Specified by:
getJavaArrayInt
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type int.- Returns:
- 1D array of ints
-
getScalarLong
public long getScalarLong(StructureMembers.Member m)
Get member data of type long.- Specified by:
getScalarLong
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type long.- Returns:
- scalar long value
-
getJavaArrayLong
public long[] getJavaArrayLong(StructureMembers.Member m)
Get member data of type long array.- Specified by:
getJavaArrayLong
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type long.- Returns:
- 1D array of longs
-
getScalarChar
public char getScalarChar(StructureMembers.Member m)
Get member data of type char.- Specified by:
getScalarChar
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type char.- Returns:
- scalar char value
-
getJavaArrayChar
public char[] getJavaArrayChar(StructureMembers.Member m)
Get member data of type char array.- Specified by:
getJavaArrayChar
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type char.- Returns:
- 1D array of chars
-
getScalarString
public String getScalarString(StructureMembers.Member m)
Get member data of type String or 1D char.- Specified by:
getScalarString
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type char.- Returns:
- scalar char value
-
getJavaArrayString
public String[] getJavaArrayString(StructureMembers.Member m)
Description copied from class:StructureData
Get java array of Strings for a member of type char or String.- Specified by:
getJavaArrayString
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type char or String.- Returns:
- 1D java array of String
-
getScalarStructure
public StructureData getScalarStructure(StructureMembers.Member m)
Description copied from class:StructureData
Get member data of type Structure.- Specified by:
getScalarStructure
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type Structure.- Returns:
- StructureData
-
getArrayStructure
public ArrayStructure getArrayStructure(StructureMembers.Member m)
Description copied from class:StructureData
Get ArrayStructure for a member of type Structure.- Specified by:
getArrayStructure
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type Structure.- Returns:
- ArrayStructure
-
getArraySequence
public ArraySequence getArraySequence(StructureMembers.Member m)
Description copied from class:StructureData
Get ArraySequence for a member of type Sequence.- Specified by:
getArraySequence
in classStructureData
- Parameters:
m
- get data from this StructureMembers.Member. Must be of type Sequence.- Returns:
- ArrayStructure
-
showInternal
public void showInternal(Formatter f, Indent indent)
- Overrides:
showInternal
in classStructureData
-
-