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) |
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() |
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.
|
protected static void |
notNullCheck(java.lang.Object o,
java.lang.String name) |
protected void |
supportedKindCheck(ConstraintKind kind) |
public SolverBase(java.lang.String name, java.lang.String description, java.util.Set<ConstraintKind> supportedKinds, boolean isGeneric)
protected static void notNullCheck(java.lang.Object o, java.lang.String name)
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.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.protected final void addStandardOperation(StandardOperation id, java.lang.String text)