Class DataTableImpl<N,V>

java.lang.Object
edu.pitt.isp.sverchkov.data.DataTableImpl<N,V>
Type Parameters:
N - Type of variable names
V - Type of variable values
All Implemented Interfaces:
DataTable<N,V>, Iterable<List<V>>

public class DataTableImpl<N,V> extends Object implements DataTable<N,V>
Data table implementation.
Version:
$Id: $Id
Author:
YUS24
  • Constructor Details

    • DataTableImpl

      public DataTableImpl(List<? extends N> vars)

      Constructor for DataTableImpl.

      Parameters:
      vars - The names of the variables in the table
  • Method Details

    • variables

      public List<N> variables()

      variables.

      Specified by:
      variables in interface DataTable<N,V>
      Returns:
      The names of the variables in the table
    • columnCount

      public int columnCount()

      columnCount.

      Specified by:
      columnCount in interface DataTable<N,V>
      Returns:
      The number of columns in the table
    • rowCount

      public int rowCount()

      rowCount.

      Specified by:
      rowCount in interface DataTable<N,V>
      Returns:
      The number of rows in the table
    • addRow

      public void addRow(List<? extends V> row)

      addRow.

      Specified by:
      addRow in interface DataTable<N,V>
      Parameters:
      row - The index of the row to retrieve
    • iterator

      public Iterator<List<V>> iterator()
      Specified by:
      iterator in interface Iterable<N>