本文整理匯總了Java中org.optaplanner.examples.common.persistence.AbstractSolutionImporter類的典型用法代碼示例。如果您正苦於以下問題:Java AbstractSolutionImporter類的具體用法?Java AbstractSolutionImporter怎麽用?Java AbstractSolutionImporter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AbstractSolutionImporter類屬於org.optaplanner.examples.common.persistence包,在下文中一共展示了AbstractSolutionImporter類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ImportAction
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
public ImportAction() {
super(NAME, new ImageIcon(SolverAndPersistenceFrame.class.getResource("importAction.png")));
if (!solutionBusiness.hasImporter()) {
fileChooser = null;
return;
}
fileChooser = new JFileChooser(solutionBusiness.getImportDataDir());
boolean firstFilter = true;
for (final AbstractSolutionImporter importer : solutionBusiness.getImporters()) {
FileFilter filter;
if (importer.isInputFileDirectory()) {
filter = new FileFilter() {
public boolean accept(File file) {
return file.isDirectory();
}
public String getDescription() {
return "Import directory";
}
};
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
} else {
filter = new FileFilter() {
public boolean accept(File file) {
return file.isDirectory() || importer.acceptInputFile(file);
}
public String getDescription() {
return "Import files (*." + importer.getInputFileSuffix() + ")";
}
};
}
fileChooser.addChoosableFileFilter(filter);
if (firstFilter) {
fileChooser.setFileFilter(filter);
firstFilter = false;
}
}
fileChooser.setDialogTitle(NAME);
}
示例2: determineImporter
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
private AbstractSolutionImporter determineImporter(File file) {
for (AbstractSolutionImporter importer : importers) {
if (importer.acceptInputFile(file)) {
return importer;
}
}
return importers[0];
}
示例3: getImporters
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
public AbstractSolutionImporter[] getImporters() {
return importers;
}
示例4: setImporters
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
public void setImporters(AbstractSolutionImporter[] importers) {
this.importers = importers;
}
示例5: importSolution
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
public void importSolution(File file) {
AbstractSolutionImporter importer = determineImporter(file);
Solution solution = importer.readSolution(file);
solutionFileName = file.getName();
guiScoreDirector.setWorkingSolution(solution);
}
示例6: createSolutionImporters
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
protected AbstractSolutionImporter[] createSolutionImporters() {
return new AbstractSolutionImporter[]{};
}
示例7: createSolutionImporters
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
@Override
protected AbstractSolutionImporter[] createSolutionImporters() {
return new AbstractSolutionImporter[]{
new ReindeerRoutingImporter()
};
}
示例8: createSolutionImporter
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
@Override
protected AbstractSolutionImporter createSolutionImporter() {
return new ColoringImporter();
}
示例9: createSolutionImporter
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
@Override
protected AbstractSolutionImporter createSolutionImporter() {
return new CourseraVrpImporter();
}
示例10: createSolutionImporter
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
@Override
protected AbstractSolutionImporter createSolutionImporter() {
return new CourseraTspImporter();
}
示例11: createSolutionImporter
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
@Override
protected AbstractSolutionImporter createSolutionImporter() {
return new KnapsackImporter();
}
示例12: createSolutionImporter
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter; //導入依賴的package包/類
@Override
protected AbstractSolutionImporter createSolutionImporter() {
return new FacultyPlacerImporter();
}