Class AbstractXlsxSolutionFileIO.AbstractXlsxReader<Solution_,Score_ extends ai.timefold.solver.core.api.score.Score<Score_>>
- java.lang.Object
-
- ai.timefold.solver.examples.common.persistence.AbstractXlsxSolutionFileIO.AbstractXlsxReader<Solution_,Score_>
-
- Enclosing class:
- AbstractXlsxSolutionFileIO<Solution_>
public abstract static class AbstractXlsxSolutionFileIO.AbstractXlsxReader<Solution_,Score_ extends ai.timefold.solver.core.api.score.Score<Score_>> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected intcurrentColumnNumberprotected org.apache.poi.xssf.usermodel.XSSFRowcurrentRowprotected Iterator<org.apache.poi.ss.usermodel.Row>currentRowIteratorprotected intcurrentRowNumberprotected org.apache.poi.xssf.usermodel.XSSFSheetcurrentSheetprotected ai.timefold.solver.core.impl.score.definition.ScoreDefinition<Score_>scoreDefinitionprotected Solution_solutionprotected org.apache.poi.xssf.usermodel.XSSFWorkbookworkbook
-
Constructor Summary
Constructors Constructor Description AbstractXlsxReader(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, String solverConfigResource)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringcurrentPosition()protected booleancurrentRowIsEmpty()protected org.apache.poi.xssf.usermodel.XSSFColorextractColor(org.apache.poi.xssf.usermodel.XSSFCell cell, org.apache.poi.xssf.usermodel.XSSFColor... acceptableColors)protected booleanhasSheet(String sheetName)protected org.apache.poi.xssf.usermodel.XSSFCellnextBooleanCell()protected org.apache.poi.xssf.usermodel.XSSFCellnextCell()protected org.apache.poi.xssf.usermodel.XSSFCellnextNumericCell()protected org.apache.poi.xssf.usermodel.XSSFCellnextNumericCellOrBlank()protected booleannextRow()protected booleannextRow(boolean skipEmptyRows)protected voidnextSheet(String sheetName)protected org.apache.poi.xssf.usermodel.XSSFCellnextStringCell()abstract Solution_read()protected voidreadHeaderCell(double value)protected voidreadHeaderCell(String value)protected voidreadIntConstraintParameterLine(String name, Consumer<Integer> consumer, String constraintDescription)protected voidreadLongConstraintParameterLine(String name, Consumer<Long> consumer, String constraintDescription)protected voidreadScoreConstraintHeaders()protected Score_readScoreConstraintLine(String constraintName, String constraintDescription)
-
-
-
Field Detail
-
workbook
protected final org.apache.poi.xssf.usermodel.XSSFWorkbook workbook
-
scoreDefinition
protected final ai.timefold.solver.core.impl.score.definition.ScoreDefinition<Score_ extends ai.timefold.solver.core.api.score.Score<Score_>> scoreDefinition
-
solution
protected Solution_ solution
-
currentSheet
protected org.apache.poi.xssf.usermodel.XSSFSheet currentSheet
-
currentRowIterator
protected Iterator<org.apache.poi.ss.usermodel.Row> currentRowIterator
-
currentRow
protected org.apache.poi.xssf.usermodel.XSSFRow currentRow
-
currentRowNumber
protected int currentRowNumber
-
currentColumnNumber
protected int currentColumnNumber
-
-
Constructor Detail
-
AbstractXlsxReader
public AbstractXlsxReader(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, String solverConfigResource)
-
-
Method Detail
-
read
public abstract Solution_ read()
-
readIntConstraintParameterLine
protected void readIntConstraintParameterLine(String name, Consumer<Integer> consumer, String constraintDescription)
-
readLongConstraintParameterLine
protected void readLongConstraintParameterLine(String name, Consumer<Long> consumer, String constraintDescription)
-
readScoreConstraintHeaders
protected void readScoreConstraintHeaders()
-
readScoreConstraintLine
protected Score_ readScoreConstraintLine(String constraintName, String constraintDescription)
-
currentPosition
protected String currentPosition()
-
hasSheet
protected boolean hasSheet(String sheetName)
-
nextSheet
protected void nextSheet(String sheetName)
-
nextRow
protected boolean nextRow()
-
nextRow
protected boolean nextRow(boolean skipEmptyRows)
-
currentRowIsEmpty
protected boolean currentRowIsEmpty()
-
readHeaderCell
protected void readHeaderCell(String value)
-
readHeaderCell
protected void readHeaderCell(double value)
-
nextStringCell
protected org.apache.poi.xssf.usermodel.XSSFCell nextStringCell()
-
nextNumericCell
protected org.apache.poi.xssf.usermodel.XSSFCell nextNumericCell()
-
nextNumericCellOrBlank
protected org.apache.poi.xssf.usermodel.XSSFCell nextNumericCellOrBlank()
-
nextBooleanCell
protected org.apache.poi.xssf.usermodel.XSSFCell nextBooleanCell()
-
nextCell
protected org.apache.poi.xssf.usermodel.XSSFCell nextCell()
-
extractColor
protected org.apache.poi.xssf.usermodel.XSSFColor extractColor(org.apache.poi.xssf.usermodel.XSSFCell cell, org.apache.poi.xssf.usermodel.XSSFColor... acceptableColors)
-
-