Class BasicIDAREWorkbook
- java.lang.Object
-
- idare.imagenode.Interfaces.DataSetReaders.WorkBook.BasicImplementation.BasicIDAREWorkbook
-
- All Implemented Interfaces:
IDAREWorkbook
public class BasicIDAREWorkbook extends Object implements IDAREWorkbook
A simple implementation of anIDAREWorkbook
- Author:
- Thomas Pfau
-
-
Constructor Summary
Constructors Constructor Description BasicIDAREWorkbook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicIDARESheet
createSheet(String sheetname)
Create a new Sheet in this Workbook.int
getNumberOfSheets()
Get the number of individual data sheets present in this workbookIDARESheet
getSheet(String arg0)
Get the sheet with the specified nameIDARESheet
getSheetAt(int arg0)
Get the Sheet at the requested position, or null if it does not exist-int
getSheetIndex(IDARESheet arg0)
Get the index of the providedIDARESheet
.int
getSheetIndex(String arg0)
Get the 0-based index of a sheet with the provided nameString
getSheetName(int arg0)
Get the name of the sheet at the provided position
-
-
-
Method Detail
-
getNumberOfSheets
public int getNumberOfSheets()
Description copied from interface:IDAREWorkbook
Get the number of individual data sheets present in this workbook- Specified by:
getNumberOfSheets
in interfaceIDAREWorkbook
- Returns:
- the number of non null sheets in this Workbook
-
getSheet
public IDARESheet getSheet(String arg0)
Description copied from interface:IDAREWorkbook
Get the sheet with the specified name- Specified by:
getSheet
in interfaceIDAREWorkbook
- Parameters:
arg0
- the name of the requested sheet- Returns:
- the requested
IDARESheet
, or null if it does not exist.
-
getSheetAt
public IDARESheet getSheetAt(int arg0)
Description copied from interface:IDAREWorkbook
Get the Sheet at the requested position, or null if it does not exist-- Specified by:
getSheetAt
in interfaceIDAREWorkbook
- Parameters:
arg0
- the 0-based position of the Sheet.- Returns:
- the sheet at the requested position
-
getSheetIndex
public int getSheetIndex(String arg0)
Description copied from interface:IDAREWorkbook
Get the 0-based index of a sheet with the provided name- Specified by:
getSheetIndex
in interfaceIDAREWorkbook
- Parameters:
arg0
- the name of theIDARESheet
- Returns:
- the index of the Sheet with the requested name, no two sheets are allowed to have the same name.
-
getSheetIndex
public int getSheetIndex(IDARESheet arg0)
Description copied from interface:IDAREWorkbook
Get the index of the providedIDARESheet
.- Specified by:
getSheetIndex
in interfaceIDAREWorkbook
- Parameters:
arg0
- the Sheet for which to obtain the index.- Returns:
- the index of the provided sheet.
-
getSheetName
public String getSheetName(int arg0)
Description copied from interface:IDAREWorkbook
Get the name of the sheet at the provided position- Specified by:
getSheetName
in interfaceIDAREWorkbook
- Parameters:
arg0
- the position of the sheet for which to obtain the name- Returns:
- the name of the
IDARESheet
, or null if the position does not contain a sheet.
-
createSheet
public BasicIDARESheet createSheet(String sheetname)
Create a new Sheet in this Workbook. If the sheetname already exists it wont be generated but the existing sheet will be returned.- Parameters:
sheetname
- The name of the sheet.- Returns:
- The generated
BasicIDARESheet
or an existing Sheet if the name already exists.
-
-