java.lang.Object
org.csveed.row.RowImpl
The Class RowImpl.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int columnIndex) Gets the content of the cell on the basis of its cell position within the Row.Gets the content of the cell in the column named columnName.getColumnName(int columnIndex) Gets the column name belonging to the cell.Returns the Headers and throws an exception if it does not exist.booleanReturns true if a Header has been set for this Row.iterator()Returns an iterator over the individual cells of a RowreportOnColumn(int columnIndex) Generates a report on the Row with focus on a particular cell.Generates a report on the Row with focus on the end of the row.intsize()The number of columns in the Row.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RowImpl
Instantiates a new row impl.- Parameters:
line- the lineheader- the header
-
-
Method Details
-
getHeader
Description copied from interface:RowReturns the Headers and throws an exception if it does not exist. Use hasHeader() if you want to prevent the throwing of an exception when a Header can lack -
reportOnEndOfLine
Description copied from interface:RowGenerates a report on the Row with focus on the end of the row. This is internally used when there is a syntax error in the line. It could also be used when there is an error that can not be traced back to a single cell.- Specified by:
reportOnEndOfLinein interfaceRow- Returns:
- report on the row with focus on the end of the row
-
reportOnColumn
Description copied from interface:RowGenerates a report on the Row with focus on a particular cell. The report can return lines for web consumption (assisting highlighting) or monospaced font printing with dual lines, the first holding the value of the line, the second showing where the error occurred.- Specified by:
reportOnColumnin interfaceRow- Parameters:
columnIndex- the index of the column to focus the report on- Returns:
- report on the row with focus on a particular cell
-
get
Description copied from interface:RowGets the content of the cell in the column named columnName. This method depends on the availability of a Header, or will otherwise throw an exception -
getColumnName
Description copied from interface:RowGets the column name belonging to the cell. This method depends on the availability of a Header, or will otherwise throw an exception- Specified by:
getColumnNamein interfaceRow- Parameters:
columnIndex- the position of the header cell within the Header line- Returns:
- the name of the column
-
hasHeader
public boolean hasHeader()Description copied from interface:RowReturns true if a Header has been set for this Row. -
size
public int size()Description copied from interface:RowThe number of columns in the Row. -
get
Description copied from interface:RowGets the content of the cell on the basis of its cell position within the Row. Counting is 0-based. -
iterator
Returns an iterator over the individual cells of a Row
-