Package ucar.array

Class StructureMembers.Member

  • Enclosing class:
    StructureMembers

    @Immutable
    public static final class StructureMembers.Member
    extends Object
    A member of a StructureData.
    • Method Detail

      • getStructureMembers

        @Nullable
        public StructureMembers getStructureMembers()
        Get nested StructureMembers, if this is a Structure or Sequence.
      • getName

        public String getName()
        Get the StructureMember's name.
      • getUnitsString

        @Nullable
        public String getUnitsString()
        Get the units string, if any.
      • getDescription

        @Nullable
        public String getDescription()
        Get the description, if any.
      • getArrayType

        public ArrayType getArrayType()
        Get the ArrayType.
      • getHeapIndex

        public int getHeapIndex()
        Get the heap index in the Members list.
      • getShape

        public int[] getShape()
        Get the array shape.
      • length

        public int length()
        Get the total number of elements.
      • isVlen

        public boolean isVlen()
        If its a variable length array.
      • getByteOrder

        public ByteOrder getByteOrder()
        The ByteOrder used when storing in StructureDataStorageBB.
      • getOffset

        public int getOffset()
        The offset from the start of th STructure, used when storing in StructureDataStorageBB.
      • getStorageSizeBytes

        public int getStorageSizeBytes()
        Get the total size in bytes needed for storing the data in this Member. A Sequence, String, Opaque, and Vlen are always stored on the heap, so this returns 4 bytes used for the heap index. A Structure may be stored on the heap, depending on StructureMembers.isStructuresOnHeap(). If true, then takes 4 bytes. If false, then this will be the sum of the member's sizes (including nested Structures) times the number of Strutures. If the Member is a nested Structure, then this is the size of one Structure times the number of nested Structures.
        Returns:
        total size in bytes
      • getStructureSize

        public int getStructureSize()
        Convenience method for members.getStorageSizeBytes(). Throws exception if not a Structure.
      • isScalar

        public boolean isScalar()
        Is this a scalar (size == 1).
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object