Interface ColumnReader<T>

Type Parameters:
T - the type of the data stored by the columns.
All Known Subinterfaces:
BatchedColumnReader<T>
All Known Implementing Classes:
AbstractBatchedColumnProcessor, AbstractBatchedObjectColumnProcessor, AbstractColumnProcessor, AbstractObjectColumnProcessor, BatchedColumnProcessor, BatchedObjectColumnProcessor, ColumnProcessor, ObjectColumnProcessor

interface ColumnReader<T>
A common interface for Processors that collect the values parsed from each column in a row. Namely: AbstractColumnProcessor, AbstractObjectColumnProcessor, AbstractBatchedColumnProcessor and AbstractBatchedObjectColumnProcessor.
See Also:
  • Method Details

    • getHeaders

      String[] getHeaders()
      Returns the column headers. This can be either the headers defined in CommonSettings.getHeaders() or the headers parsed in the input when CommonSettings.getHeaders() equals to true
      Returns:
      the headers of all column parsed.
    • getColumnValuesAsList

      List<List<T>> getColumnValuesAsList()
      Returns the values processed for each column
      Returns:
      a list of lists. The stored lists correspond to the position of the column processed from the input; Each list contains the corresponding values parsed for a column, across multiple rows.
    • putColumnValuesInMapOfNames

      void putColumnValuesInMapOfNames(Map<String,List<T>> map)
      Fills a given map associating each column name to its list o values
      Parameters:
      map - the map to hold the values of each column
      Throws:
      IllegalArgumentException - if a column does not have a name associated to it. In this case, use putColumnValuesInMapOfIndexes(Map) instead.
    • putColumnValuesInMapOfIndexes

      void putColumnValuesInMapOfIndexes(Map<Integer,List<T>> map)
      Fills a given map associating each column index to its list of values
      Parameters:
      map - the map to hold the values of each column
    • getColumnValuesAsMapOfNames

      Map<String,List<T>> getColumnValuesAsMapOfNames()
      Returns a map of column names and their respective list of values parsed from the input.
      Returns:
      a map of column names and their respective list of values.
    • getColumnValuesAsMapOfIndexes

      Map<Integer,List<T>> getColumnValuesAsMapOfIndexes()
      Returns a map of column indexes and their respective list of values parsed from the input.
      Returns:
      a map of column indexes and their respective list of values.
    • getColumn

      List<T> getColumn(String columnName)
      Returns the values of a given column.
      Parameters:
      columnName - the name of the column in the input.
      Returns:
      a list with all data stored in the given column
    • getColumn

      List<T> getColumn(int columnIndex)
      Returns the values of a given column.
      Parameters:
      columnIndex - the position of the column in the input (0-based).
      Returns:
      a list with all data stored in the given column