Package ucar.ma2
Class StructureMembers.Member
- java.lang.Object
-
- ucar.ma2.StructureMembers.Member
-
- Enclosing class:
- StructureMembers
public static final class StructureMembers.Member extends Object
A member of a StructureData.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ArraygetDataArray()Get the data array, if any.ObjectgetDataObject()Get an opaque data object, for use behind the scenes.intgetDataParam()Get the data parameter value, for use behind the scenes.DataTypegetDataType()Get the DataType.StringgetDescription()Get the description, if any.StringgetFullName()StringgetFullNameEscaped()StringgetName()Get the StructureMembers name.int[]getShape()Get the array shape.intgetSize()Get the total number of elements.intgetSizeBytes()Get the total size in bytes.StructureMembersgetStructureMembers()StringgetUnitsString()Get the units string, if any.booleanisScalar()Is this a scalar (size == 1).booleanisVariableLength()voidsetDataArray(Array data)Deprecated.use MemberBuildervoidsetDataObject(Object o)Deprecated.use MemberBuildervoidsetDataParam(int dataParam)Deprecated.use MemberBuildervoidsetShape(int[] shape)Deprecated.use MemberBuildervoidsetStructureMembers(StructureMembers members)Deprecated.use MemberBuildervoidsetVariableInfo(String vname, String desc, String unitString, DataType dtype)Deprecated.use MemberBuilderStructureMembers.MemberBuildertoBuilder(boolean wantsData)Turn into a mutable Builder.StringtoString()
-
-
-
Constructor Detail
-
Member
@Deprecated public Member(String name, String desc, String units, DataType dtype, int[] shape)
Deprecated.use MemberBuilder
-
Member
@Deprecated public Member(StructureMembers.Member from)
Deprecated.use MemberBuilder
-
-
Method Detail
-
toBuilder
public StructureMembers.MemberBuilder toBuilder(boolean wantsData)
Turn into a mutable Builder. Can use toBuilder().build() to copy.
-
setStructureMembers
@Deprecated public void setStructureMembers(StructureMembers members)
Deprecated.use MemberBuilderIf member is type Structure, you must set its constituent members.- Parameters:
members- set to this value- Throws:
IllegalArgumentException- ifmembersis this Member's enclosing class instance.
-
getStructureMembers
public StructureMembers getStructureMembers()
-
setShape
@Deprecated public void setShape(int[] shape)
Deprecated.use MemberBuilder
-
getName
public String getName()
Get the StructureMembers name.
-
getFullNameEscaped
public String getFullNameEscaped()
-
getFullName
public String getFullName()
-
getUnitsString
public String getUnitsString()
Get the units string, if any.- Returns:
- the units string, or null if none.
-
getDescription
public String getDescription()
Get the description, if any.- Returns:
- the description, or null if none.
-
getDataType
public DataType getDataType()
Get the DataType.- Returns:
- the DataType.
-
getShape
public int[] getShape()
Get the array shape. This does not have to match the VariableSimpleIF.- Returns:
- the array shape.
-
getSize
public int getSize()
Get the total number of elements. This does not have to match the VariableSimpleIF.- Returns:
- the total number of elements.
-
isVariableLength
public boolean isVariableLength()
-
getSizeBytes
public int getSizeBytes()
Get the total size in bytes. This does not have to match the VariableSimpleIF. Note that this will not be correct when containing a member of type Sequence, or String, since those are variable length. In that case- Returns:
- total size in bytes
-
isScalar
public boolean isScalar()
Is this a scalar (size == 1). This does not have to match the VariableSimpleIF.- Returns:
- if this is a scalar
-
getDataParam
public int getDataParam()
Get the data parameter value, for use behind the scenes.- Returns:
- data parameter value
-
setDataParam
@Deprecated public void setDataParam(int dataParam)
Deprecated.use MemberBuilderSet the data parameter value, for use behind the scenes.- Parameters:
dataParam- set to this value
-
getDataArray
public Array getDataArray()
Get the data array, if any. Used for implementation, DO NOT USE DIRECTLY!- Returns:
- data object, may be null
-
setDataArray
@Deprecated public void setDataArray(Array data)
Deprecated.use MemberBuilderSet the data array. Used for implementation, DO NOT USE DIRECTLY!- Parameters:
data- set to this Array. must not be a logical view
-
getDataObject
public Object getDataObject()
Get an opaque data object, for use behind the scenes. May be null- Returns:
- data object, may be null
-
setDataObject
@Deprecated public void setDataObject(Object o)
Deprecated.use MemberBuilderSet an opaque data object, for use behind the scenes.- Parameters:
o- set to this value
-
setVariableInfo
@Deprecated public void setVariableInfo(String vname, String desc, String unitString, DataType dtype)
Deprecated.use MemberBuilder
-
-