public class SolutionContainer extends Solution
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<java.lang.String> |
solutionNames
Ordered list of the names of solutions stored in this compound solution.
|
protected java.util.LinkedHashMap<java.lang.String,Solution> |
solutions
List of solution instances this compound solution stores.
|
evaluation, name
Constructor and Description |
---|
SolutionContainer(java.lang.String thisName)
Create a new instance of SolutionContainer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addSolution(Solution thisSolution)
Add a new solution to this compound solution.
|
boolean |
addSolutionName(java.lang.String solutionName)
Add a solution name or id to this compound solution.
|
void |
clearSolutions()
Clear the list of solutions.
|
java.lang.Object |
clone()
Clone this object to create a copy of the main features.
|
Solution |
getSolution(java.lang.String solutionName)
Get the solution with the specified name.
|
java.util.ArrayList<java.lang.String> |
getSolutionNames()
Get the list of ordered solution names stored in this solution.
|
java.util.LinkedHashMap<java.lang.String,Solution> |
getSolutions()
Get all solutions stored in this compound solution.
|
void |
removeSolution(java.lang.String solutionName)
Remove the specified solution from the list.
|
getEvaluation, getName, setEvaluation, setName
protected java.util.ArrayList<java.lang.String> solutionNames
public SolutionContainer(java.lang.String thisName)
thisName
- this compound solution name or ID.public boolean addSolutionName(java.lang.String solutionName)
addSolution
, as
two solutions with the same name cannot be added. This option is available
for a different usage of this class.solutionName
- the solution name to add.public java.util.ArrayList<java.lang.String> getSolutionNames()
public void clearSolutions()
public boolean addSolution(Solution thisSolution)
thisSolution
- the solution to add.public void removeSolution(java.lang.String solutionName)
solutionName
- the solution name.public Solution getSolution(java.lang.String solutionName)
solutionName
- the solution name.public java.util.LinkedHashMap<java.lang.String,Solution> getSolutions()
public java.lang.Object clone()
clone
in class java.lang.Object