Class AbstractXlsxSolutionFileIO.AbstractXlsxReader<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
- java.lang.Object
-
- org.optaplanner.examples.common.persistence.AbstractXlsxSolutionFileIO.AbstractXlsxReader<Solution_,Score_>
-
- Enclosing class:
- AbstractXlsxSolutionFileIO<Solution_>
public abstract static class AbstractXlsxSolutionFileIO.AbstractXlsxReader<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
currentColumnNumber
protected org.apache.poi.xssf.usermodel.XSSFRow
currentRow
protected Iterator<org.apache.poi.ss.usermodel.Row>
currentRowIterator
protected int
currentRowNumber
protected org.apache.poi.xssf.usermodel.XSSFSheet
currentSheet
protected org.optaplanner.core.impl.score.definition.ScoreDefinition<Score_>
scoreDefinition
protected Solution_
solution
protected org.apache.poi.xssf.usermodel.XSSFWorkbook
workbook
-
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 String
currentPosition()
protected boolean
currentRowIsEmpty()
protected org.apache.poi.xssf.usermodel.XSSFColor
extractColor(org.apache.poi.xssf.usermodel.XSSFCell cell, org.apache.poi.xssf.usermodel.XSSFColor... acceptableColors)
protected boolean
hasSheet(String sheetName)
protected org.apache.poi.xssf.usermodel.XSSFCell
nextBooleanCell()
protected org.apache.poi.xssf.usermodel.XSSFCell
nextCell()
protected org.apache.poi.xssf.usermodel.XSSFCell
nextNumericCell()
protected org.apache.poi.xssf.usermodel.XSSFCell
nextNumericCellOrBlank()
protected boolean
nextRow()
protected boolean
nextRow(boolean skipEmptyRows)
protected void
nextSheet(String sheetName)
protected org.apache.poi.xssf.usermodel.XSSFCell
nextStringCell()
abstract Solution_
read()
protected void
readHeaderCell(double value)
protected void
readHeaderCell(String value)
protected void
readIntConstraintParameterLine(String name, Consumer<Integer> consumer, String constraintDescription)
protected void
readLongConstraintParameterLine(String name, Consumer<Long> consumer, String constraintDescription)
protected void
readScoreConstraintHeaders()
protected Score_
readScoreConstraintLine(String constraintName, String constraintDescription)
-
-
-
Field Detail
-
workbook
protected final org.apache.poi.xssf.usermodel.XSSFWorkbook workbook
-
scoreDefinition
protected final org.optaplanner.core.impl.score.definition.ScoreDefinition<Score_ extends org.optaplanner.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)
-
-