Interface ColumnReader<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<T> getColumn​(int columnIndex)
      Returns the values of a given column.
      java.util.List<T> getColumn​(java.lang.String columnName)
      Returns the values of a given column.
      java.util.List<java.util.List<T>> getColumnValuesAsList()
      Returns the values processed for each column
      java.util.Map<java.lang.Integer,​java.util.List<T>> getColumnValuesAsMapOfIndexes()
      Returns a map of column indexes and their respective list of values parsed from the input.
      java.util.Map<java.lang.String,​java.util.List<T>> getColumnValuesAsMapOfNames()
      Returns a map of column names and their respective list of values parsed from the input.
      java.lang.String[] getHeaders()
      Returns the column headers.
      void putColumnValuesInMapOfIndexes​(java.util.Map<java.lang.Integer,​java.util.List<T>> map)
      Fills a given map associating each column index to its list of values
      void putColumnValuesInMapOfNames​(java.util.Map<java.lang.String,​java.util.List<T>> map)
      Fills a given map associating each column name to its list o values
    • Method Detail

      • getColumnValuesAsList

        java.util.List<java.util.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​(java.util.Map<java.lang.String,​java.util.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:
        java.lang.IllegalArgumentException - if a column does not have a name associated to it. In this case, use putColumnValuesInMapOfIndexes(Map) instead.
      • putColumnValuesInMapOfIndexes

        void putColumnValuesInMapOfIndexes​(java.util.Map<java.lang.Integer,​java.util.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

        java.util.Map<java.lang.String,​java.util.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

        java.util.Map<java.lang.Integer,​java.util.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

        java.util.List<T> getColumn​(java.lang.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

        java.util.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