public abstract class SolverBase extends java.lang.Object implements Solver
Constructor and Description |
---|
SolverBase(java.lang.String name,
java.lang.String description,
java.util.Set<ConstraintKind> supportedKinds,
boolean isGeneric,
java.lang.String envVarName) |
Modifier and Type | Method and Description |
---|---|
boolean |
addCustomOperation(Function function)
Register a custom operation that extends the functionality of the solver.
|
boolean |
addCustomOperation(FunctionTemplate template)
Register a custom operation that extends the functionality of the solver.
|
protected void |
addStandardOperation(StandardOperation id,
java.lang.String text) |
java.lang.String |
getDescription()
Returns the description of the solver.
|
java.lang.String |
getName()
Returns the name of the solver.
|
java.util.Map<java.lang.Enum<?>,SolverOperation> |
getOperations() |
java.lang.String |
getSolverPath()
Returns the path to the external constraint solver executable used
by the current solver object.
|
boolean |
isGeneric()
Returns true if the solver is generic and false if it is custom.
|
boolean |
isSupported(ConstraintKind kind)
Check whether the specified constraint kind is supported by the solver.
|
void |
setSolverPath(java.lang.String value)
Sets the path to the external constraint solver executable used
by the current solver object.
|
protected void |
supportedKindCheck(ConstraintKind kind) |
public SolverBase(java.lang.String name, java.lang.String description, java.util.Set<ConstraintKind> supportedKinds, boolean isGeneric, java.lang.String envVarName)
protected final void supportedKindCheck(ConstraintKind kind)
public final java.lang.String getName()
Solver
public final java.lang.String getDescription()
Solver
getDescription
in interface Solver
public final boolean isSupported(ConstraintKind kind)
Solver
isSupported
in interface Solver
kind
- Constraint kind.public final boolean isGeneric()
Solver
public final java.util.Map<java.lang.Enum<?>,SolverOperation> getOperations()
public final boolean addCustomOperation(Function function)
Solver
addCustomOperation
in interface Solver
function
- Object describing the semantics and syntax of the function.true
if no such operation has been previously registered or
false
otherwise.public final boolean addCustomOperation(FunctionTemplate template)
Solver
addCustomOperation
in interface Solver
template
- Function template that describes the semantics and syntax of a family of
similar functions.true
if no such operation has been previously registered or
false
otherwise.protected final void addStandardOperation(StandardOperation id, java.lang.String text)
public java.lang.String getSolverPath()
Solver
getSolverPath
in interface Solver
public void setSolverPath(java.lang.String value)
Solver
setSolverPath
in interface Solver
value
- Path