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 | |
---|---|---|
![]() |
ColumnTable | Create the object after checking consistency. |
Public Properties
Name | Description | |
---|---|---|
![]() |
Bases | Get the base classes of the columns. |
![]() |
Columns | Get the actual data arrays |
![]() |
NCols | Get the number of columns in the table. |
![]() |
NRows | Get the number of rows in the table. |
![]() |
Sizes |
Public Methods
Name | Description | |
---|---|---|
![]() |
AddColumn | Add a column. |
![]() |
AddRow | Add a row to the table. This method is very inefficient for adding multiple rows and should be avoided if possible. |
![]() |
DeleteColumns | |
![]() |
DeleteRow | Delete a row from the table. |
![]() |
DeleteRows | |
![]() |
Equals | Determines whether the specified |
![]() |
GetColumn | Get a particular column. |
![]() |
GetElement | Get a element of the table. |
![]() |
GetHashCode | Serves as a hash function for a particular type. |
![]() |
GetRow | Get a row of data. |
![]() |
GetType | Gets the |
![]() |
Read | Read a table. |
![]() |
SetColumn | Set the values in a particular column. The new values must match the old in length but not necessarily in type. |
![]() |
SetElement | Modify an element of the table. |
![]() |
SetRow | Modify a row of data. |
![]() |
ToString | Returns a |
![]() |
Write | Write a table. |
Protected Methods
Name | Description | |
---|---|---|
![]() |
AddPointer | Add a pointer in the pointer lists. |
![]() |
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. |
![]() |
Finalize | Allows an |
![]() |
GetNumberOfRows | Calculate the number of rows to read/write at a time. |
![]() |
InitializePointers | Set the pointer arrays for the eight primitive types to point to the appropriate elements of arrays. |
![]() |
MemberwiseClone | Creates a shallow copy of the current |
![]() |
Setup | Actually perform the initialization. |