View Javadoc
1   package org.csveed.api;
2   
3   import org.csveed.report.RowReport;
4   
5   /**
6   * The original header of the CSV file
7   * @author Robert Bor
8   */
9   public interface Header extends Iterable<String> {
10  
11      /**
12      * Number of columns
13      * @return the number of columns
14      */
15      int size();
16  
17      /**
18      * Gets the name of the header column with passed index
19      * @param indexColumn column index to find the name for
20      * @return name of the header column
21      */
22      String getName(int indexColumn);
23  
24      /**
25      * Gets the index column of the first column with a certain name
26      * @param columnName column name to find the index for
27      * @return index of the header column
28      */
29      int getIndex(String columnName);
30  
31      /**
32      * Generate an error report on the header row
33      * @return error report on the header row
34      */
35      RowReport reportOnEndOfLine();
36  
37  }