org.optaplanner.core.impl.solver
Class XStreamXmlSolverFactory
java.lang.Object
org.optaplanner.core.api.solver.SolverFactory
org.optaplanner.core.impl.solver.XStreamXmlSolverFactory
public class XStreamXmlSolverFactory
- extends SolverFactory
XML based configuration that builds a Solver
with XStream
.
- See Also:
SolverFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XStreamXmlSolverFactory
public XStreamXmlSolverFactory()
buildXStream
public static com.thoughtworks.xstream.XStream buildXStream()
- Builds the
XStream
setup which is used to read/write solver configs and benchmark configs.
It should never be used to read/write Solution
instances. Use XStreamProblemIO for that instead.
- Returns:
- never null.
addXStreamAnnotations
public void addXStreamAnnotations(Class... xStreamAnnotations)
configure
public XStreamXmlSolverFactory configure(String solverConfigResource)
- Parameters:
solverConfigResource
- never null, a classpath resource
as defined by ClassLoader.getResource(String)
- Returns:
- this
configure
public XStreamXmlSolverFactory configure(File solverConfigFile)
configure
public XStreamXmlSolverFactory configure(InputStream in)
configure
public XStreamXmlSolverFactory configure(Reader reader)
getSolverConfig
public SolverConfig getSolverConfig()
- Description copied from class:
SolverFactory
- Allows you to problematically change the
SolverConfig
at runtime before building the Solver
.
- Specified by:
getSolverConfig
in class SolverFactory
- Returns:
- never null
buildSolver
public Solver buildSolver()
- Description copied from class:
SolverFactory
- Creates a new
Solver
instance.
- Specified by:
buildSolver
in class SolverFactory
- Returns:
- never null
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.