javax.constraints.impl.search.goal
Class GoalApplySolution

java.lang.Object
  extended by javax.constraints.impl.CommonBase
      extended by javax.constraints.impl.search.AbstractSearchStrategy
          extended by javax.constraints.impl.search.goal.Goal
              extended by javax.constraints.impl.search.goal.GoalApplySolution
All Implemented Interfaces:
SearchStrategy

public class GoalApplySolution
extends Goal

This goal is trying to resolve the problem using a solution passed as a parameter.


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.constraints.SearchStrategy
SearchStrategy.SearchStrategyType
 
Constructor Summary
GoalApplySolution(Solution solution)
           
 
Method Summary
 Goal execute()
          Adds a solution to the array of the current problem solutions.
 
Methods inherited from class javax.constraints.impl.search.goal.Goal
and, getSolver, or, trace
 
Methods inherited from class javax.constraints.impl.search.AbstractSearchStrategy
getType, getValueSelector, getVarReals, getVars, getVarSelector, run, setType, setValueSelector, setValueSelectorType, setVarReals, setVars, setVars, setVars, setVarSelector, setVarSelectorType
 
Methods inherited from class javax.constraints.impl.CommonBase
getImpl, getName, getObject, getProblem, setImpl, setName, setObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.constraints.SearchStrategy
getImpl, getName, getObject, setImpl, setName, setObject
 

Constructor Detail

GoalApplySolution

public GoalApplySolution(Solution solution)
Method Detail

execute

public Goal execute()
             throws java.lang.Exception
Adds a solution to the array of the current problem solutions. Increases the total number of solutions. If it has reaches getMaxNumberOfSolutions() then after adding the solution the goal fails.

Specified by:
execute in class Goal
Returns:
goal or null
Throws:
java.lang.Exception