Drools Planner distribution 6.0.0.Alpha9

org.drools.planner.examples.common.persistence
Class AbstractTxtSolutionImporter.TxtInputBuilder

java.lang.Object
  extended by org.drools.planner.examples.common.persistence.AbstractTxtSolutionImporter.TxtInputBuilder
Direct Known Subclasses:
CurriculumCourseSolutionImporter.CurriculumCourseInputBuilder, ExaminationSolutionImporter.ExaminationInputBuilder, MachineReassignmentSolutionImporter.MachineReassignmentInputBuilder, Manners2009SolutionImporter.Manners2009InputBuilder, PatientAdmissionScheduleSolutionImporter.PatientAdmissionScheduleInputBuilder, TravelingTournamentSolutionImporter.TravelingTournamentInputBuilder, TspSolutionImporter.TravelingSalesmanTourInputBuilder, VehicleRoutingSolutionImporter.VrpScheduleInputBuilder
Enclosing class:
AbstractTxtSolutionImporter

public abstract class AbstractTxtSolutionImporter.TxtInputBuilder
extends Object


Field Summary
protected  BufferedReader bufferedReader
           
protected  File inputFile
           
 
Constructor Summary
AbstractTxtSolutionImporter.TxtInputBuilder()
           
 
Method Summary
 BigInteger factorial(int base)
           
 String getInputId()
           
 boolean parseBooleanFromNumber(String token)
           
 void readConstantLine(String constantValue)
           
 void readEmptyLine()
           
 int readIntegerValue()
           
 int readIntegerValue(String prefix)
           
 int readIntegerValue(String prefix, String suffix)
           
 long readLongValue()
           
 long readLongValue(String prefix)
           
 long readLongValue(String prefix, String suffix)
           
abstract  Solution readSolution()
           
 String readStringValue()
           
 String readStringValue(String prefix)
           
 String readStringValue(String prefix, String suffix)
           
 void readUntilConstantLine(String constantValue)
           
 String removePrefixSuffixFromLine(String line, String prefix, String suffix)
           
 void setBufferedReader(BufferedReader bufferedReader)
           
 void setInputFile(File inputFile)
           
 String[] splitBy(String line, String tokenRegex, String tokenName, Integer numberOfTokens, boolean trim, boolean removeQuotes)
           
 String[] splitBy(String line, String tokenRegex, String tokenName, Integer minimumNumberOfTokens, Integer maximumNumberOfTokens, boolean trim, boolean removeQuotes)
           
 String[] splitByPipelineAndTrim(String line, int numberOfTokens)
           
 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[] splitBySpacesOrTabs(String line)
           
 String[] splitBySpacesOrTabs(String line, Integer numberOfTokens)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputFile

protected File inputFile

bufferedReader

protected BufferedReader bufferedReader
Constructor Detail

AbstractTxtSolutionImporter.TxtInputBuilder

public AbstractTxtSolutionImporter.TxtInputBuilder()
Method Detail

setInputFile

public void setInputFile(File inputFile)

setBufferedReader

public void setBufferedReader(BufferedReader bufferedReader)

readSolution

public abstract Solution readSolution()
                               throws IOException
Throws:
IOException

getInputId

public String getInputId()

readEmptyLine

public void readEmptyLine()
                   throws IOException
Throws:
IOException

readConstantLine

public void readConstantLine(String constantValue)
                      throws IOException
Throws:
IOException

readUntilConstantLine

public void readUntilConstantLine(String constantValue)
                           throws IOException
Throws:
IOException

readIntegerValue

public int readIntegerValue()
                     throws IOException
Throws:
IOException

readIntegerValue

public int readIntegerValue(String prefix)
                     throws IOException
Throws:
IOException

readIntegerValue

public int readIntegerValue(String prefix,
                            String suffix)
                     throws IOException
Throws:
IOException

readLongValue

public long readLongValue()
                   throws IOException
Throws:
IOException

readLongValue

public long readLongValue(String prefix)
                   throws IOException
Throws:
IOException

readLongValue

public long readLongValue(String prefix,
                          String suffix)
                   throws IOException
Throws:
IOException

readStringValue

public String readStringValue()
                       throws IOException
Throws:
IOException

readStringValue

public String readStringValue(String prefix)
                       throws IOException
Throws:
IOException

readStringValue

public String readStringValue(String prefix,
                              String suffix)
                       throws IOException
Throws:
IOException

removePrefixSuffixFromLine

public String removePrefixSuffixFromLine(String line,
                                         String prefix,
                                         String suffix)

splitBySpace

public String[] splitBySpace(String line)

splitBySpace

public String[] splitBySpace(String line,
                             Integer numberOfTokens)

splitBySpace

public String[] splitBySpace(String line,
                             Integer minimumNumberOfTokens,
                             Integer maximumNumberOfTokens)

splitBySpacesOrTabs

public String[] splitBySpacesOrTabs(String line)

splitBySpacesOrTabs

public String[] splitBySpacesOrTabs(String line,
                                    Integer numberOfTokens)

splitByPipelineAndTrim

public String[] splitByPipelineAndTrim(String line,
                                       int numberOfTokens)

splitBySemicolonSeparatedValue

public String[] splitBySemicolonSeparatedValue(String line,
                                               int numberOfTokens)

splitBy

public String[] splitBy(String line,
                        String tokenRegex,
                        String tokenName,
                        Integer numberOfTokens,
                        boolean trim,
                        boolean removeQuotes)

splitBy

public String[] splitBy(String line,
                        String tokenRegex,
                        String tokenName,
                        Integer minimumNumberOfTokens,
                        Integer maximumNumberOfTokens,
                        boolean trim,
                        boolean removeQuotes)

parseBooleanFromNumber

public boolean parseBooleanFromNumber(String token)

factorial

public BigInteger factorial(int base)

Drools Planner distribution 6.0.0.Alpha9

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.