Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.CR1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.api.solver
Class SolverFactory

    java.lang.Object
      org.optaplanner.core.api.solver.SolverFactory

Direct Known Subclasses:
  XStreamXmlSolverFactory

    public abstract class SolverFactory

extends Object

Builds `Solver` instances.

Supports tweaking the configuration programmatically before a `Solver` instance is build.

Constructor Summary
`SolverFactory()`

Method Summary
`abstract Solver` | `buildSolver()` Creates a new `Solver` instance.
`static SolverFactory` | `createFromXmlFile(File solverConfigFile)`
`static SolverFactory` | `createFromXmlInputStream(InputStream in)`
`static SolverFactory` | `createFromXmlReader(Reader reader)`
`static SolverFactory` | `createFromXmlResource(String solverConfigResource)`
`abstract SolverConfig` | `getSolverConfig()` Allows you to problematically change the `SolverConfig` at runtime before building the `Solver`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SolverFactory

    public SolverFactory()

Method Detail

### createFromXmlResource

    public static SolverFactory createFromXmlResource(String solverConfigResource)

  Parameters:
    `solverConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
  Returns:
    never null

### createFromXmlFile

    public static SolverFactory createFromXmlFile(File solverConfigFile)

  Parameters:
    `solverConfigFile` - never null
  Returns:
    never null

### createFromXmlInputStream

    public static SolverFactory createFromXmlInputStream(InputStream in)

  Parameters:
    `in` - never null, gets closed
  Returns:
    never null

### createFromXmlReader

    public static SolverFactory createFromXmlReader(Reader reader)

  Parameters:
    `reader` - never null, gets closed
  Returns:
    never null

### getSolverConfig

    public abstract SolverConfig getSolverConfig()

  Allows you to problematically change the `SolverConfig` at runtime before building the `Solver`.

  Returns:
    never null

### buildSolver

    public abstract Solver buildSolver()

  Creates a new `Solver` instance.

  Returns:
    never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.CR1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.