Class AbstractTxtSolutionImporter.TxtInputBuilder<Solution_>
java.lang.Object
ai.timefold.solver.examples.common.app.LoggingMain
ai.timefold.solver.examples.common.persistence.AbstractSolutionImporter.InputBuilder
ai.timefold.solver.examples.common.persistence.AbstractTxtSolutionImporter.TxtInputBuilder<Solution_>
- Direct Known Subclasses:
CurriculumCourseImporter.CurriculumCourseInputBuilder,ExaminationImporter.ExaminationInputBuilder,MachineReassignmentImporter.MachineReassignmentInputBuilder,PatientAdmissionScheduleImporter.PatientAdmissionScheduleInputBuilder,ProjectJobSchedulingImporter.ProjectJobSchedulingInputBuilder,ProjectJobSchedulingImporter.ProjectJobSchedulingInputBuilder.ProjectFileInputBuilder,TravelingTournamentImporter.TravelingTournamentInputBuilder,TspImporter.TspInputBuilder,VehicleRoutingImporter.VehicleRoutingInputBuilder
- Enclosing class:
- AbstractTxtSolutionImporter<Solution_>
public abstract static class AbstractTxtSolutionImporter.TxtInputBuilder<Solution_>
extends AbstractSolutionImporter.InputBuilder
-
Field Summary
FieldsFields inherited from class ai.timefold.solver.examples.common.app.LoggingMain
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanparseBooleanFromNumber(String token) voidreadConstantLine(BufferedReader subBufferedReader, String constantRegex) voidreadConstantLine(String constantRegex) voidintintreadIntegerValue(String prefixRegex) intreadIntegerValue(String prefixRegex, String suffixRegex) longlongreadLongValue(String prefixRegex) longreadLongValue(String prefixRegex, String suffixRegex) booleanreadOptionalConstantLine(String constantRegex) readOptionalStringValue(String defaultValue) readOptionalStringValue(String prefixRegex, String defaultValue) readOptionalStringValue(String prefixRegex, String suffixRegex, String defaultValue) abstract Solution_readStringValue(String prefixRegex) readStringValue(String prefixRegex, String suffixRegex) voidreadUntilConstantLine(String constantRegex) removePrefixSuffixFromLine(String line, String prefixRegex, String suffixRegex) voidsetBufferedReader(BufferedReader bufferedReader) voidsetInputFile(File inputFile) voidskipOptionalConstantLines(String constantRegex) String[]splitBy(String line, String delimiterRegex, String delimiterName, Integer numberOfTokens, boolean trim, boolean removeQuotes) String[]splitBy(String line, String delimiterRegex, String delimiterName, Integer minimumNumberOfTokens, Integer maximumNumberOfTokens, boolean trim, boolean removeQuotes) String[]splitByCommaAndTrim(String line, int numberOfTokens) String[]splitByCommaAndTrim(String line, Integer minimumNumberOfTokens, Integer maximumNumberOfTokens) String[]splitByPipelineAndTrim(String line, int numberOfTokens) String[]String[]splitBySemicolonSeparatedValue(String line, int numberOfTokens) String[]splitBySpace(String line) String[]splitBySpace(String line, Integer numberOfTokens) String[]splitBySpace(String line, Integer minimumNumberOfTokens, Integer maximumNumberOfTokens) String[]splitBySpace(String line, Integer minimumNumberOfTokens, Integer maximumNumberOfTokens, boolean trim, boolean removeQuotes) String[]splitBySpacesOrTabs(String line) String[]splitBySpacesOrTabs(String line, Integer numberOfTokens) String[]splitBySpacesOrTabs(String line, Integer minimumNumberOfTokens, Integer maximumNumberOfTokens)
-
Field Details
-
inputFile
-
bufferedReader
-
-
Constructor Details
-
TxtInputBuilder
public TxtInputBuilder()
-
-
Method Details
-
setInputFile
-
setBufferedReader
-
readSolution
- Throws:
IOException
-
getInputId
-
readEmptyLine
- Throws:
IOException
-
readConstantLine
- Throws:
IOException
-
readConstantLine
public void readConstantLine(BufferedReader subBufferedReader, String constantRegex) throws IOException - Throws:
IOException
-
readOptionalConstantLine
- Throws:
IOException
-
skipOptionalConstantLines
- Throws:
IOException
-
readUntilConstantLine
- Throws:
IOException
-
readIntegerValue
- Throws:
IOException
-
readIntegerValue
- Throws:
IOException
-
readIntegerValue
- Throws:
IOException
-
readLongValue
- Throws:
IOException
-
readLongValue
- Throws:
IOException
-
readLongValue
- Throws:
IOException
-
readStringValue
- Throws:
IOException
-
readStringValue
- Throws:
IOException
-
readStringValue
- Throws:
IOException
-
readOptionalStringValue
- Throws:
IOException
-
readOptionalStringValue
- Throws:
IOException
-
readOptionalStringValue
public String readOptionalStringValue(String prefixRegex, String suffixRegex, String defaultValue) throws IOException - Throws:
IOException
-
removePrefixSuffixFromLine
-
splitBySpace
-
splitBySpace
-
splitBySpace
-
splitBySpace
-
splitBySpacesOrTabs
-
splitBySpacesOrTabs
-
splitBySpacesOrTabs
-
splitByPipelineAndTrim
-
splitBySemicolonSeparatedValue
-
splitBySemicolonSeparatedValue
-
splitByCommaAndTrim
-
splitByCommaAndTrim
-
splitBy
-
splitBy
-
parseBooleanFromNumber
-