Class DataTable


  • public class DataTable
    extends java.lang.Object
    Basic data structure for all collected data.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String[] columnnames
      The table column names.
      protected java.util.Map columns
      The map of column indices.
      protected java.lang.String name
      The table name.
      protected java.util.List rows
      The data rows.
    • Constructor Summary

      Constructors 
      Constructor Description
      DataTable​(java.lang.String name, java.lang.String[] columnnames)
      Create a new data table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRow​(java.lang.Object[] row)
      Add a data row.
      int getColumnIndex​(java.lang.String columnname)
      Get the column index for a column name.
      java.lang.String[] getColumnNames()
      Get the columnnames.
      java.lang.Object getData​(int row, int column)
      Get the data element from a specific row and column.
      java.lang.String getName()
      Get the name.
      java.util.List getRows()
      Get the data rows.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
        The table name.
      • columnnames

        protected java.lang.String[] columnnames
        The table column names.
      • rows

        protected java.util.List rows
        The data rows.
      • columns

        protected java.util.Map columns
        The map of column indices.
    • Constructor Detail

      • DataTable

        public DataTable​(java.lang.String name,
                         java.lang.String[] columnnames)
        Create a new data table.
    • Method Detail

      • addRow

        public void addRow​(java.lang.Object[] row)
        Add a data row.
        Parameters:
        row - The data row.
      • getRows

        public java.util.List getRows()
        Get the data rows.
        Returns:
        The data rows.
      • getColumnNames

        public java.lang.String[] getColumnNames()
        Get the columnnames.
        Returns:
        The columnnames.
      • getColumnIndex

        public int getColumnIndex​(java.lang.String columnname)
        Get the column index for a column name.
        Parameters:
        columnname - The column name.
        Returns:
        The column index.
      • getData

        public java.lang.Object getData​(int row,
                                        int column)
        Get the data element from a specific row and column.
      • getName

        public java.lang.String getName()
        Get the name.
        Returns:
        The name.