ucar.ma2
Class StructureMembers

java.lang.Object
  extended by ucar.ma2.StructureMembers

public class StructureMembers
extends Object

A Collection of members contained in a StructureData.

Author:
caron

Nested Class Summary
 class StructureMembers.Member
          A member of a StructureData.
 
Constructor Summary
StructureMembers(String name)
           
StructureMembers(StructureMembers from)
           
 
Method Summary
 StructureMembers.Member addMember(String name, String desc, String units, DataType dtype, int[] shape)
           
 void addMember(StructureMembers.Member m)
          Add a member.
 StructureMembers.Member findMember(String memberName)
          Find the member by its name.
 StructureMembers.Member getMember(int index)
          Get the index-th member
 List<String> getMemberNames()
          Get the names of the members.
 List<StructureMembers.Member> getMembers()
          Get the list of Member objects.
 String getName()
          Get the name.
 int getStructureSize()
          Get the total size of the Structure in bytes.
 void hideMember(StructureMembers.Member m)
           
 void setStructureSize(int structureSize)
          Set the total size of the Structure in bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructureMembers

public StructureMembers(String name)

StructureMembers

public StructureMembers(StructureMembers from)
Method Detail

getName

public String getName()
Get the name.

Returns:
the name.

addMember

public void addMember(StructureMembers.Member m)
Add a member.

Parameters:
m - member to add

addMember

public StructureMembers.Member addMember(String name,
                                         String desc,
                                         String units,
                                         DataType dtype,
                                         int[] shape)

hideMember

public void hideMember(StructureMembers.Member m)

getStructureSize

public int getStructureSize()
Get the total size of the Structure in bytes.

Returns:
the total size of the Structure in bytes.

setStructureSize

public void setStructureSize(int structureSize)
Set the total size of the Structure in bytes.

Parameters:
structureSize - set to this value

getMembers

public List<StructureMembers.Member> getMembers()
Get the list of Member objects.

Returns:
the list of Member objects.

getMemberNames

public List<String> getMemberNames()
Get the names of the members.

Returns:
List of type String.

getMember

public StructureMembers.Member getMember(int index)
Get the index-th member

Parameters:
index - of member
Returns:
Member

findMember

public StructureMembers.Member findMember(String memberName)
Find the member by its name.

Parameters:
memberName - find by this name
Returns:
Member matching the name, or null if not found


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.