Class BasicIDARECell
- java.lang.Object
-
- idare.imagenode.Interfaces.DataSetReaders.WorkBook.BasicImplementation.BasicIDARECell
-
- All Implemented Interfaces:
IDARECell
public class BasicIDARECell extends Object implements IDARECell
Basic implementation of a Simple Cell for aBasicIDAREWorkbook
.- Author:
- Thomas Pfau
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface idare.imagenode.Interfaces.DataSetReaders.WorkBook.IDARECell
IDARECell.CellType
-
-
Constructor Summary
Constructors Constructor Description BasicIDARECell(IDARECell.CellType type, BasicIDARERow containingRow)
Basic Constructor indicating the containing row and the type of the cellBasicIDARECell(IDARECell.CellType type, String value, BasicIDARERow containingRow)
Basic Constructor indicating the containing row and the type of the cell, along with the value to be stored.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDARECell.CellType
getCellType()
Get the Cell Type ofint
getColumnIndex()
Get the index of the column of this cell.String
getFormattedCellValue()
Get a string representation of the value of this cell (regardless what this cell actually represents).double
getNumericCellValue()
Get the Numeric Value of this cell, if it can be converted to numeric.String
getStringCellValue()
Get the string cell value, if the cell is a string cell.void
setValue(String value)
Set the value (this is unchecked wrt the type defined).
-
-
-
Constructor Detail
-
BasicIDARECell
public BasicIDARECell(IDARECell.CellType type, BasicIDARERow containingRow)
Basic Constructor indicating the containing row and the type of the cell- Parameters:
type
- the CellType of the cellcontainingRow
- The Row containing this cell
-
BasicIDARECell
public BasicIDARECell(IDARECell.CellType type, String value, BasicIDARERow containingRow)
Basic Constructor indicating the containing row and the type of the cell, along with the value to be stored.- Parameters:
type
- the CellType of this cellvalue
- the value of this cellcontainingRow
- the row containing this cell
-
-
Method Detail
-
getCellType
public IDARECell.CellType getCellType()
Description copied from interface:IDARECell
Get the Cell Type of- Specified by:
getCellType
in interfaceIDARECell
- Returns:
- the Type of the Cell (defined by the static definitions in
IDARECell
-
getColumnIndex
public int getColumnIndex()
Description copied from interface:IDARECell
Get the index of the column of this cell.- Specified by:
getColumnIndex
in interfaceIDARECell
- Returns:
- the column index
-
getNumericCellValue
public double getNumericCellValue()
Description copied from interface:IDARECell
Get the Numeric Value of this cell, if it can be converted to numeric. Can throw exceptions if the contained value is either not a parsable double or the Cell Type is String.- Specified by:
getNumericCellValue
in interfaceIDARECell
- Returns:
- the numeric value of this cell
-
getStringCellValue
public String getStringCellValue()
Description copied from interface:IDARECell
Get the string cell value, if the cell is a string cell. Can throw exceptions if the cell type is numeric.- Specified by:
getStringCellValue
in interfaceIDARECell
- Returns:
- the string cell value.
-
getFormattedCellValue
public String getFormattedCellValue()
Description copied from interface:IDARECell
Get a string representation of the value of this cell (regardless what this cell actually represents).- Specified by:
getFormattedCellValue
in interfaceIDARECell
- Returns:
- a String representing the value of this cell.
-
setValue
public void setValue(String value)
Set the value (this is unchecked wrt the type defined).- Parameters:
value
- the value this Cell should have
-
-