A data table is conventionally considered to consist of rows and columns, where the structure within each column is constant, but different columns may have different structures. I.e., structurally columns may differ but rows are identical. Typically tabular data is usually stored in row order which can make it extremely difficult to access efficiently using Java. This class provides efficient access to data which is stored in row order and allows users to get and set the elements of the table. The table can consist only of arrays of primitive types. Data stored in column order can be efficiently read and written using the BufferedDataXputStream classes. * The table is represented entirely as a set of one-dimensional primitive arrays. For a given column, a row consists of some number of contiguous elements of the array. Each column is required to have the same number of rows.


The following tables list the members exposed by ColumnTable.

Public Constructors

  Name Description
Public method ColumnTable Create the object after checking consistency.
Top

Public Properties

  Name Description
Public property Bases Get the base classes of the columns.
Public property Columns Get the actual data arrays
Public property NCols Get the number of columns in the table.
Public property NRows Get the number of rows in the table.
Public property Sizes  
Top

Public Methods

  Name Description
Public method AddColumn Add a column.
Public method AddRow Add a row to the table. This method is very inefficient for adding multiple rows and should be avoided if possible.
Public method DeleteColumns  
Public method DeleteRow Delete a row from the table.
Public method DeleteRows  
Public method Equals Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method GetColumn Get a particular column.
Public method GetElement Get a element of the table.
Public method GetHashCode Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method GetRow Get a row of data.
Public method GetType Gets the Type of the current instance. (inherited from Object)
Public method Read Read a table.
Public method SetColumn Set the values in a particular column. The new values must match the old in length but not necessarily in type.
Public method SetElement Modify an element of the table.
Public method SetRow Modify a row of data.
Public method ToString Returns a String that represents the current Object. (inherited from Object)
Public method Write Write a table.
Top

Protected Methods

  Name Description
Family method AddPointer Add a pointer in the pointer lists.
Family method CheckArrayConsistency Check that the columns and sizes are consistent. Inconsistencies include: * arrays and sizes have different lengths. * an element of arrays is not a primitive array. * the size of an array is not divisible by the sizes entry. * the number of rows differs for the columns.
Family method Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method GetNumberOfRows Calculate the number of rows to read/write at a time.
Family method InitializePointers Set the pointer arrays for the eight primitive types to point to the appropriate elements of arrays.
Family method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object)
Family method Setup Actually perform the initialization.
Top

See Also