public final class SolverResultBuilder
extends java.lang.Object
Constructor and Description |
---|
SolverResultBuilder(SolverResult.Status status)
Constructs a SolverResultBuilder object.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(java.lang.String error)
Adds an error description to the list of errors.
|
void |
addVariable(Variable variable)
Adds a variable to the list of variables.
|
SolverResult |
build()
Creates a solver result object basing attributes hold by the builder.
|
boolean |
hasErrors()
Checks whether any errors have been registered.
|
void |
setStatus(SolverResult.Status status)
Sets the status of the result.
|
public SolverResultBuilder(SolverResult.Status status)
status
- The initial status of the result.public SolverResult build()
public void setStatus(SolverResult.Status status)
status
- Result status.public void addError(java.lang.String error)
error
- An error description.public void addVariable(Variable variable)
variable
- A variable object.public boolean hasErrors()
true
if any errors have been reported or false
otherwise.