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 boolean
equals(Object o)
Array
getDataArray()
Get the data array, if any.Object
getDataObject()
Get an opaque data object, for use behind the scenes.int
getDataParam()
Get the data parameter value, for use behind the scenes.DataType
getDataType()
Get the DataType.String
getDescription()
Get the description, if any.String
getFullName()
String
getFullNameEscaped()
String
getName()
Get the StructureMembers name.int[]
getShape()
Get the array shape.int
getSize()
Get the total number of elements.int
getSizeBytes()
Get the total size in bytes.StructureMembers
getStructureMembers()
String
getUnitsString()
Get the units string, if any.boolean
isScalar()
Is this a scalar (size == 1).boolean
isVariableLength()
void
setDataArray(Array data)
Deprecated.use MemberBuildervoid
setDataObject(Object o)
Deprecated.use MemberBuildervoid
setDataParam(int dataParam)
Deprecated.use MemberBuildervoid
setShape(int[] shape)
Deprecated.use MemberBuildervoid
setStructureMembers(StructureMembers members)
Deprecated.use MemberBuildervoid
setVariableInfo(String vname, String desc, String unitString, DataType dtype)
Deprecated.use MemberBuilderStructureMembers.MemberBuilder
toBuilder(boolean wantsData)
Turn into a mutable Builder.String
toString()
-
-
-
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
- ifmembers
is 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
-
-