Class SpreadsheetRow
java.lang.Object
org.eclipse.epsilon.emc.spreadsheets.SpreadsheetRow
- Direct Known Subclasses:
ExcelRow
This class represents a row of a worksheet. A row must always belong to a
worksheet.
- Author:
- Martins Francis
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns a list of every value contained by the cell.getAllVisibleCellValues
(SpreadsheetColumn column, boolean trim) The purpose of this method is to return all visible values of the given cell.This method returns a list of every value contained by the cell.getModel()
abstract String
getVisibleCellValue
(SpreadsheetColumn column) The purpose of this method is to return the visible value stored by the given cell.abstract void
overwriteCellValue
(SpreadsheetColumn column, String value) The purpose of this method is to overwrite the value of the cell.toString()
protected void
validateColumn
(SpreadsheetColumn column) protected void
writeManyVisibleValues
(SpreadsheetColumn column, List<String> valuesToWrite) This method writes the given values to the cell.protected void
writeOneVisibleValue
(SpreadsheetColumn column, String valueToWrite) This method writes the given value to the cell.void
writeVisibleCellValues
(SpreadsheetColumn column, List<String> valuesToWrite) The purpose of this method is to write the given values to the given cell.
-
Field Details
-
worksheet
-
-
Constructor Details
-
SpreadsheetRow
-
-
Method Details
-
getModel
-
getWorksheet
-
getColumn
-
getReferencesBySource
-
getReferencesByTarget
-
getVisibleCellValue
The purpose of this method is to return the visible value stored by the given cell. The 'visible value' means the value stored by the cell and observed when the row is viewed in the spreadsheet. This means any worksheet metadata shall be disregarded by this method.- Parameters:
column
-- Returns:
- the visible value of the cell
-
validateColumn
-
getAllVisibleCellValues
The purpose of this method is to return all visible values of the given cell. This means that cell multiplicity is accounted for when reading the cell however any other worksheet metadata information is disregarded. Whitespace around every cell value is removed before it is returned if specified to do so.- Parameters:
column
-trim
-- Returns:
- all visible values stored in the cell
-
getAllVisibleCellValuesAsIs
This method returns a list of every value contained by the cell.- Parameters:
column
-- Returns:
- cell values
-
getAllVisibleCellValues
This method returns a list of every value contained by the cell. Each value is trimmed before adding to the list.- Parameters:
column
-- Returns:
- cell values, trimmed
-
overwriteCellValue
The purpose of this method is to overwrite the value of the cell.- Parameters:
column
-value
- the new value of the cell
-
writeVisibleCellValues
The purpose of this method is to write the given values to the given cell. If the column may contain multiple values then each value from the list is separated by column's delimiter before writing to the cell. If the column may contain only one value then only the first value from the list is written. Data type conformity is enforced if specified to do so in metadata configuration.- Parameters:
column
-valuesToWrite
-
-
writeManyVisibleValues
This method writes the given values to the cell. Data type conformity is enforced for each value if applicable.- Parameters:
column
-valuesToWrite
-
-
writeOneVisibleValue
This method writes the given value to the cell. Data type conformity is enforced if applicable.- Parameters:
column
-valueToWrite
-
-
toString
-