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 BasicIDARESheetcreateSheet(String sheetname)Create a new Sheet in this Workbook.intgetNumberOfSheets()Get the number of individual data sheets present in this workbookIDARESheetgetSheet(String arg0)Get the sheet with the specified nameIDARESheetgetSheetAt(int arg0)Get the Sheet at the requested position, or null if it does not exist-intgetSheetIndex(IDARESheet arg0)Get the index of the providedIDARESheet.intgetSheetIndex(String arg0)Get the 0-based index of a sheet with the provided nameStringgetSheetName(int arg0)Get the name of the sheet at the provided position
-
-
-
Method Detail
-
getNumberOfSheets
public int getNumberOfSheets()
Description copied from interface:IDAREWorkbookGet the number of individual data sheets present in this workbook- Specified by:
getNumberOfSheetsin interfaceIDAREWorkbook- Returns:
- the number of non null sheets in this Workbook
-
getSheet
public IDARESheet getSheet(String arg0)
Description copied from interface:IDAREWorkbookGet the sheet with the specified name- Specified by:
getSheetin 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:IDAREWorkbookGet the Sheet at the requested position, or null if it does not exist-- Specified by:
getSheetAtin 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:IDAREWorkbookGet the 0-based index of a sheet with the provided name- Specified by:
getSheetIndexin 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:IDAREWorkbookGet the index of the providedIDARESheet.- Specified by:
getSheetIndexin 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:IDAREWorkbookGet the name of the sheet at the provided position- Specified by:
getSheetNamein 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
BasicIDARESheetor an existing Sheet if the name already exists.
-
-