Package com.bayesserver.data
Class DataTable
- java.lang.Object
-
- com.bayesserver.data.DataTable
-
public class DataTable extends Object
A simple in memory data structure which can be used as an alternative to a data store (such as a database).
-
-
Constructor Summary
Constructors Constructor Description DataTable()
Creates a new instance of the DataTable class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTable
copy()
Copies both the structure and data in the DataTable.DataTable
copy(boolean copyData)
Copies the structure and optionally the data in the DataTable.DataTableReader
createDataReader()
Create a DataReader based on the DataTable.DataColumnCollection
getColumns()
Gets the columns in the table.DataRowCollection
getRows()
Gets the rows of data in the table.DataRow
newRow()
Creates a new row of data, but does not add it to the table.
-
-
-
Method Detail
-
newRow
public DataRow newRow()
Creates a new row of data, but does not add it to the table.- Returns:
- A new DataRow instance, but does not add it to the DataTable.
-
copy
public DataTable copy()
Copies both the structure and data in the DataTable.- Returns:
- A new DataTable instance.
-
copy
public DataTable copy(boolean copyData)
Copies the structure and optionally the data in the DataTable.- Returns:
- A new DataTable instance.
-
getRows
public DataRowCollection getRows()
Gets the rows of data in the table.
-
getColumns
public DataColumnCollection getColumns()
Gets the columns in the table.
-
createDataReader
public DataTableReader createDataReader()
Create a DataReader based on the DataTable.- Returns:
- A new DataTableReader instance.
-
-